How to test sendmail?
Moderator: moderator
-
- Posts: 19
- Joined: Thu Dec 31, 2009 7:44 pm
How to test sendmail?
Hi FOlks,
After installing the OpenEMM server, I created a mailing and send message to administrator recipient. OpenEMM page says everything is ok and messages was created but I never receive them.
So I was wondering:
1- Is there a way to test the sendmail installation without using openemm?
2- Which log files could I check in order to see what went wrong?
Thanks again for all the help and support.
Best regards,
After installing the OpenEMM server, I created a mailing and send message to administrator recipient. OpenEMM page says everything is ok and messages was created but I never receive them.
So I was wondering:
1- Is there a way to test the sendmail installation without using openemm?
2- Which log files could I check in order to see what went wrong?
Thanks again for all the help and support.
Best regards,
-
- Posts: 19
- Joined: Thu Dec 31, 2009 7:44 pm
Hi Pheelix,
From the logs it seems that connections are being deferred:
I'm also trying to issue a test from command line with "sendmail -v myemail@..." with the same deffered connection status.
Also, when I execute netstat -nl I don't see anything listening at port 25.
Do you guys have any idea on what could be wrong on my configuration?
Finally, apart from that I'm seeing the following message at maillog:
Should I change permissions on file?
Thanks in advance.
From the logs it seems that connections are being deferred:
Code: Select all
Jan 2 13:30:11 emm sendmail[6722]: o02FU847006722: to=myemail@hotmail.com, ctladdr=eric (1000/1001), delay=00:00:03, xdelay=00:00:00, mailer=relay, pri=30006, relay=emm.XXX.com.br. [XXX.XXX.XXX.XXX], dsn=4.0.0, stat=Deferred: Connection refused by emm.XXX.com.br.
Also, when I execute netstat -nl I don't see anything listening at port 25.
Code: Select all
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:8900 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5166 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:53432 0.0.0.0:* LISTEN
udp 0 0 0.0.0.0:59098 0.0.0.0:*
udp 0 0 0.0.0.0:111 0.0.0.0:*
udp 0 0 0.0.0.0:762 0.0.0.0:*
udp 0 0 XX.XXX.XXX.XXX:123 0.0.0.0:*
udp 0 0 127.0.0.1:123 0.0.0.0:*
udp 0 0 0.0.0.0:123 0.0.0.0:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 10762 /var/run/mysqld/mysqld.sock
unix 2 [ ACC ] STREAM LISTENING 15014 /home/openemm/var/run/bav.sock
Do you guys have any idea on what could be wrong on my configuration?
Code: Select all
divert(-1)dnl
divert(0)dnl
define(`_USE_ETC_MAIL_')dnl
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
VERSIONID(`$Id: sendmail.mc, v 8.14.2-2build1 2008-01-24 14:29:57 cowboy Exp $')
OSTYPE(`debian')dnl
DOMAIN(`debian-mta')dnl
dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
undefine(`confHOST_STATUS_DIRECTORY')dnl #DAEMON_HOSTSTATS=
dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
dnl #
dnl # General defines
dnl #
dnl # SAFE_FILE_ENV: [undefined] If set, sendmail will do a chroot()
dnl # into this directory before writing files.
dnl # If *all* your user accounts are under /home then use that
dnl # instead - it will prevent any writes outside of /home !
dnl # define(`confSAFE_FILE_ENV', `')dnl
dnl #
dnl # Daemon options - restrict to servicing LOCALHOST ONLY !!!
dnl # Remove `, Addr=' clauses to receive from any interface
dnl # If you want to support IPv6, switch the commented/uncommentd lines
dnl #
FEATURE(`no_default_msa')dnl
#dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl
dnl DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp')dnl
#dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, Addr=::1')dnl
DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl
dnl #
dnl # Be somewhat anal in what we allow
define(`confPRIVACY_FLAGS',dnl
`needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl
dnl #
dnl # Define connection throttling and window length
define(`confCONNECTION_RATE_THROTTLE', `15')dnl
define(`confCONNECTION_RATE_WINDOW_SIZE',`10m')dnl
dnl #
dnl # Features
dnl #
dnl # use /etc/mail/local-host-names
FEATURE(`use_cw_file')dnl
dnl #
dnl # The access db is the basis for most of sendmail's checking
FEATURE(`access_db', , `skip')dnl
dnl #
dnl # The greet_pause feature stops some automail bots - but check the
dnl # provided access db for details on excluding localhosts...
FEATURE(`greet_pause', `1000')dnl 1 seconds
dnl #
dnl # Delay_checks allows sender<->recipient checking
FEATURE(`delay_checks', `friend', `n')dnl
dnl #
dnl # If we get too many bad recipients, slow things down...
define(`confBAD_RCPT_THROTTLE',`3')dnl
dnl #
dnl # Stop connections that overflow our concurrent and time connection rates
FEATURE(`conncontrol', `nodelay', `terminate')dnl
FEATURE(`ratecontrol', `nodelay', `terminate')dnl
# added from the openEMM wiki page
FEATURE(`nouucp',`reject')dnl
FEATURE(`local_procmail')dnl
FEATURE(`mailertable')dnl
FEATURE(`relay_entire_domain')dnl
dnl #
dnl # If you're on a dialup link, you should enable this - so sendmail
dnl # will not bring up the link (it will queue mail for later)
dnl define(`confCON_EXPENSIVE',`True')dnl
dnl #
dnl # Dialup/LAN connection overrides
dnl #
include(`/etc/mail/m4/dialup.m4')dnl
include(`/etc/mail/m4/provider.m4')dnl
dnl #
dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl
# from openEMM wiki page
MAILER(`procmail')dnl
INPUT_MAIL_FILTER(`bav',`S=unix:/home/openemm/var/run/bav.sock, F=T')dnl
Code: Select all
Jan 2 13:29:17 emm sendmail[6614]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 1765: Xbav: local socket name /home/openemm/var/run/bav.sock unsafe: Group writable directory
Thanks in advance.
-
- Posts: 19
- Joined: Thu Dec 31, 2009 7:44 pm
Ok, found the error so far, and registering it here for future reference.
The problem was related to bav.socket error, which was caused because smctrl was not running setuid, as explained in http://www.openemm.org/forums/ftopic56.html
Also needed to install libxml2, which was not installed in my ubuntu by default.
After that everything seems to be is working like a charm.
The problem was related to bav.socket error, which was caused because smctrl was not running setuid, as explained in http://www.openemm.org/forums/ftopic56.html
Code: Select all
chown -R openemm:openemm .bash* *
chown root:root bin/smctrl
chown root:root conf/bav/bav.rc
chmod 6755 bin/smctrl
chmod 0600 conf/bav/bav.rc
After that everything seems to be is working like a charm.
-
- Posts: 62
- Joined: Tue Aug 25, 2009 8:17 am
Thanks for the tip!
@OpenEMM Team:
Why is this not included in the current install guide of OpenEMM 6.1?
@OpenEMM Team:
Code: Select all
chown -R openemm:openemm .bash* *
chown root:root bin/smctrl
chown root:root conf/bav/bav.rc
chmod 6755 bin/smctrl
chmod 0600 conf/bav/bav.rc