From: <pu...@we...> - 2005-08-16 10:21:08
|
Apologies for taking so long to reply, I have been busy in the non digital world! Anyway I have tried to implement your suggestion to no avail so I changed the configuration around a bit Firstly I added a second IP address to my NIC using: ip addr add 192.168.0.2/24 broadcast 192.168.0.255 dev eth0 then i created three separate sendmail config files. inbound, local and outbound in inbound i have: dnl # dk-milter INPUT_MAIL_FILTER(`dk-filter', `S=inet:9981@localhost') define(`confDONT_PROBE_INTERFACES',`True')dnl DAEMON_OPTIONS(`Port=smtp, Addr=127.0.0.1, Name=MTA1') DAEMON_OPTIONS(`Port=smtp, Addr=192.168.0.1, Name=MTA') for local i have define(`SMART_HOST',`dk.websavages.com')dnl define(`confDONT_PROBE_INTERFACES',`True')dnl DAEMON_OPTIONS(`Port=smtp, Addr=127.0.0.1, Name=MTA1') DAEMON_OPTIONS(`Port=smtp, Addr=192.168.0.1, Name=MTA') n.b. dk.websavages.com is an A record to 192.168.0.2 in my internal dns and for outbound i have dnl # dk-milter INPUT_MAIL_FILTER(`dk-filter', `S=inet:9982@localhost') define(`confDONT_PROBE_INTERFACES',`True')dnl DAEMON_OPTIONS(`Port=smtp, Addr=192.168.0.2, Name=MTA2') the sendmail processes are started as follows $SENDMAIL -bd -OPrivacyOptions=noetrn \ -ODeliveryMode=queueonly \ -OQueueDirectory=$INQDIR \ -OPidFile=$INPID -C/etc/mail/inbound.cf touch /var/run/sm-client.pid chown $MSPUSER:$MSPGROUP /var/run/sm-client.pid 2>/dev/null $SENDMAIL -L sm-msp-queue -Ac -q15m -OPidFile=$SMPID 2>/dev/null $SENDMAIL $([ -n "$QUEUETIME" ] && echo -q$QUEUETIME) \ -OPidFile=$OUTPID -C/etc/mail/local.cf $SENDMAIL -bd -OPidFile=/var/run/outbound.pid -C/etc/mail/outbound.cf and finally dk-filter as follows dk-filter -l -p inet:9981@localhost -b v -u dkmilter -P /var/run/dk-milter/dk.in.pid dk-filter -l -p inet:9982@localhost -s /var/run/dk-milter/mail.key.pem -u dkmilter -S mail -d websavages.com -i /etc/mail/dk-interfaces -bs -c simple -P /var/run/dk-milter/dk.out.pid now incoming mail gets verified and headers appended to mail to indicate as such. outgoing mail doesn't get passed on the the smart host but is delivered directly as indicated by the log entry: Aug 16 20:01:46 piglet sendmail[7013]: j7GA1kJZ007013: from=pu...@we..., size=1211, class=0, nrcpts=1, msgid=<200...@we...>, relay=apache@localhost Aug 16 20:01:46 piglet sendmail[7014]: j7GA1kUu007014: from=<pu...@we...>, size=1373, class=0, nrcpts=1, msgid=<200...@we...>, proto=ESMTP, daemon=MTA1, relay=localhost.localdomain [127.0.0.1] Aug 16 20:01:46 piglet sendmail[7014]: j7GA1kUu007014: to=<**********@yahoo.co.uk>, delay=00:00:00, mailer=esmtp, pri=31373, stat=queued Aug 16 20:01:46 piglet sendmail[7013]: j7GA1kJZ007013: to=**********@yahoo.co.uk, ctladdr=pu...@we... (30/30), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31211, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (j7GA1kUu007014 Message accepted for delivery) Aug 16 20:01:48 piglet MailScanner[3979]: New Batch: Scanning 1 messages, 1907 bytes Aug 16 20:01:49 piglet MailScanner[3979]: Virus and Content Scanning: Starting Aug 16 20:01:50 piglet MailScanner[3979]: Uninfected: Delivered 1 messages Aug 16 20:01:50 piglet MailScanner[3979]: Database ping failure attempting to re-connect Aug 16 20:01:50 piglet MailScanner[3979]: Initialising database connection Aug 16 20:01:50 piglet MailScanner[3979]: Finished initialising database connection Aug 16 20:10:15 piglet sendmail[7255]: j7GA1kUu007014: to=<*********@yahoo.co.uk>, ctladdr=<pu...@we...> (505/505), delay=00:08:29, xdelay=00:00:07, mailer=esmtp, pri=121373, relay=mx2.mail.ukl.yahoo.com. [217.12.11.64], dsn=2.0.0, stat=Sent (ok dirdel) any ideas? ------------------ www.websavages.com |