Testing sendmail greet_pause FEATURE
Scenario: we are considering implementing the sendmail greet_pause
FEATURE, but we do not want to actually reject connections while we
gather statistics (e.g. legitimate domains to whitelist, optimal greet_pause value).
By commenting out two lines in srvrsmtp.c in the sendmail source, and rebuilding and reinstalling sendmail, we can simulate the greet_pause FEATURE and log its results without actually rejecting commands sent in the SMTP session.
The following steps were performed on a sendmail 8.13.6 installation.
1. $ cd sendmail-8.13.6/sendmail
2. Edit srvrsmtp.c, and change:
#endif /* _FFR_LOG_GREET_PAUSE */
greetcode = "554";
nullserver = "Command rejected";
sm_syslog(LOG_INFO, e->e_id,
#if _FFR_LOG_GREET_PAUSE
To:
#endif /* _FFR_LOG_GREET_PAUSE */
/*
greetcode = "554";
nullserver = "Command rejected";*/
sm_syslog(LOG_INFO, e->e_id,
#if _FFR_LOG_GREET_PAUSE
3. $ ./Build
4. $ cd ..
5. # ./Build install; /etc/init.d/sendmail start
6. Enable the greet_pause FEATURE, and configure the access database accordingly. sendmail will log the greet_pause rejection, but will allow the SMTP session.
May 8 16:52:48 hostname
sm-mta[14141]: [ID 801593 mail.info] k48LqmfX014141: rejecting commands
from [192.168.1.1] [192.168.1.1] due to pre-greeting traffic
Back to brandonhutchinson.com.
Last modified: 2006/05/08