[Dovecot] Sendmail + Deliver as an LDA probs
Hi,
I'm having trouble setting up sendmail to be able to use dovecot deliver as an LDA... I don't want to be able to deliver mail locally, everything should go via deliver (virtual user setup)... And i'm confused about all the procmail/lda entry's in different sendmail config files...
When using $# deliver -u testuser < testmail <-- he delivers my mail in the correct mailbox as stated in my dovecot passdb file homedir. So deliver is working fine !
I used the dovecot.m4 from wiki.dovecot.org/LDA/sendmail
sendmail.mc fragment (only lines affecting Local delivery) :
DOMAIN(blaat')dnl MODIFY_MAILER_FLAGS(
LOL', -S')dnl FEATURE(
local_procmail')dnl
define(LOL_MAILER_PATH',
/usr/bin/procmail')dnl
define(PROCMAIL_MAILER_PATH',
/usr/bin/procmail')dnl
dnl MAILER(local')dnl MAILER(
smtp')dnl
MAILER(procmail')dnl MAILER(
dovecot')dnl
dnl
blaat.m4 fragment :
define(LOCAL_MAILER_PATH',
/usr/bin/procmail')
define(PROCMAIL_MAILER_PATH',
/usr/bin/procmail')
more /usr/local/src/sendmail-x.x/cf/mailer/dovecot.m4 :
######################*****############## ### DOVECOT Mailer specification ### ##################*****################## Mdovecot, P=/opt/dovecot/libexec/dovecot/deliver, F=DFMPhnu9, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, T=DNS/RFC822/X-Unix, A=deliver -d $u
virtusertable/virtusertable.db :
test@testdomain.com blaatuser
aliases/aliases.db :
blaatuser | /opt/dovecot/libexec/dovecot/deliver -d $u
sendmail.cw = empty
mailertable/mailertable.db :
testdomain.com dovecot:dovecot
#################
When I run #$ sendmail -bv test@testdomain.com sendmail gives :
test@testdomain.com... deliverable: mailer local, user test (as a matter of fact the user test does exist on my machine, so what he does is stripping of the domainname and he delivers the mail in /var/spool/mqueue/test :-/ ) And I don't see anything in my deliver logfile of course...
Help would be appreciated !
thx Ben
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 19 Feb 2009, ben wrote:
aliases/aliases.db :
blaatuser | /opt/dovecot/libexec/dovecot/deliver -d $u
In my eyes, there are two problems here:
- This line should read
blaatuser: "| /opt..."
- you cannot use $u in aliases
Also, delivering in Aliases means that sendmail is using a non-root / non-virtuser-uid UID. So you probably have to SetUID-root deliver, in order to give deliver a) permission to the auth socket and b) permission to spool the message into the mailbox.
====
Actually you never told sendmail to use the dovecot: mailer you've configured.
Remove both the virtuser and alias entry, so sendmail even tries to hit mailertable you have configuered the dovecot: mailer in.
Also, remove the domain from local-host-names and place it into relay-domains.
Check the requireness of SetUID-root of deliver. (s. above)
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBSZ1G9HWSIuGy1ktrAQL9fwf8CLD+bMo6C5GrLSiZ1GWRp6rV4nJalfpL Lzpe0B/274nYjMkMzh+8xOgDxdkyNOweEJYfzULJu+jFIWARmNJNq1CczCCH3paR RQExE2sF/1UD4ZzVptdI86CQ0k90G8EfDKzxR7QQj7Dyo9uCLGfI4P+njVyRmNCL YqWg58p0bAQF6BF6PEFg8ZwBxuLj2NPc1YJ0R7xt00luT2up0QSoFahv0Gq06/yR SfMfJh/lcB63vpERwgnkubMPn0grhafoS7fLZqZfsXdzphZ0GlNFCKRWs41N5G3l 4KUTnFaoy9AHN4+Dmn/Rn7bGcBQTMQz8cLOtYLO7UngufLW/A2lSNQ== =74TF -----END PGP SIGNATURE-----
Ok,
aliases file = empty and rebuilded virtusertable = empty + rebuilded sendmail.cw = emtpy added testdomain.com --> relay-domains
I also removed my MAILER(dovecot)dnl entry and adjusted my sendmail.mc
to :
DOMAIN(testdomain')dnl MODIFY_MAILER_FLAGS(
LOCAL', -f')dnl FEATURE(
local_procmail',
/opt/dovecot/libexec/dovecot/deliver',
deliver
-c /opt/dovecot/etc/dovecot.conf -d $u', SPhnu9')dnl define(
confDONT_PROBE_INTERFACES',True')dnl define(
PROCMAIL_MAILER_PATH',/usr/bin/procmail')dnl dnl MAILER(
local')dnl
MAILER(smtp')dnl MAILER(
procmail')dnl
dnl #MAILER(`dovecot')dnl
I also commented in domain.m4
dnl #define(LOCAL_MAILER_PATH',
/usr/bin/procmail')
dnl #define(PROCMAIL_MAILER_PATH',
/usr/bin/procmail')
=============
/etc/mail/mailterable : testdomain.com dovecot:dovecot
=============
restarted sendmail and sended a testmail :
I think I have this error becaue local-host-names (sendmail.cw) is emtpy ...
=========LOG==========
Feb 19 13:27:45 hostname sm-mta[1223]: n1JCRXkt001223: from=test@testdomain.com, size=5, class=0, nrcpts=1, msgid=<200902191227.n1JCRXkt001223@hostname.xxxxx. com>, proto=SMTP, daemon=MTA, relay=localhost [127.0.0.1] Feb 19 13:27:46 hostname sm-mta[1223]: n1JCRXkt001223: SYSERR(root): mail.testdomain.com. config error: mail loops back to me (MX problem?) Feb 19 13:27:46 hostname sm-mta[1223]: n1JCRXkt001223: to=test@testdomain.com, delay=0 0:00:04, xdelay=00:00:01, mailer=esmtp, pri=30005, relay=mail.testdomain.com. [195.207 .136.102], dsn=5.3.5, stat=Local configuration error Feb 19 13:27:46 hostname sm-mta[1225]: n1JCRjV1001225: hostname.xxxxx.com [195 .207.136.102] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA Feb 19 13:27:46 hostname sm-mta[1223]: n1JCRXkt001223: to=postmaster, delay=00:0 0:04, mailer=local, pri=30005, dsn=5.1.1, stat=User unknown Feb 19 13:27:46 hostname sm-mta[1223]: n1JCRXkt001223: n1JCRXku001223: DSN: User unknown Feb 19 13:27:51 hostname sm-mta[1223]: STARTTLS=client, relay=mail.testdomain.co m., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256 Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXku001223: to=test@testdomain.com, d elay=00:00:06, xdelay=00:00:06, mailer=esmtp, pri=31029, relay=mail.testdomain.c om. [xxx.xxx.xxx.xxx], dsn=2.0.0, stat=Sent (n1JCQXWE016132 Message accepted for delivery) Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXku001223: to=MAILER-DAEMON, delay=0 0:00:06, mailer=local, pri=31029, dsn=5.1.1, stat=User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXku001223: to=postmaster, delay=00:0 0:06, mailer=local, pri=31029, dsn=5.1.1, stat=User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXku001223: n1JCRXkv001223: return to sender: User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkv001223: to=MAILER-DAEMON, delay=0 0:00:00, mailer=local, pri=2053, dsn=5.1.1, stat=User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXku001223: Losing ./qfn1JCRXku001223 : savemail panic Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXku001223: SYSERR(root): savemail: c annot save rejected email anywhere Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkt001223: to=Postmaster, delay=00:0 0:10, mailer=local, pri=30005, dsn=5.1.1, stat=User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkt001223: n1JCRXkw001223: postmaste r notify: User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkw001223: to=MAILER-DAEMON, delay=0 0:00:00, mailer=local, pri=0, dsn=5.1.1, stat=User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkw001223: to=postmaster, delay=00:0 0:00, mailer=local, pri=0, dsn=5.1.1, stat=User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkw001223: n1JCRXkx001223: return to sender: User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkx001223: to=MAILER-DAEMON, delay=0 0:00:00, mailer=local, pri=0, dsn=5.1.1, stat=User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkw001223: Losing ./qfn1JCRXkw001223 : savemail panic Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkw001223: SYSERR(root): savemail: c annot save rejected email anywhere
=========END==========
On Thu, 2009-02-19 at 12:48 +0100, Steffen Kaiser wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 19 Feb 2009, ben wrote:
aliases/aliases.db :
blaatuser | /opt/dovecot/libexec/dovecot/deliver -d $u
In my eyes, there are two problems here:
- This line should read
blaatuser: "| /opt..."
- you cannot use $u in aliases
Also, delivering in Aliases means that sendmail is using a non-root / non-virtuser-uid UID. So you probably have to SetUID-root deliver, in order to give deliver a) permission to the auth socket and b) permission to spool the message into the mailbox.
====
Actually you never told sendmail to use the dovecot: mailer you've configured.
Remove both the virtuser and alias entry, so sendmail even tries to hit mailertable you have configuered the dovecot: mailer in.
Also, remove the domain from local-host-names and place it into relay-domains.
Check the requireness of SetUID-root of deliver. (s. above)
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBSZ1G9HWSIuGy1ktrAQL9fwf8CLD+bMo6C5GrLSiZ1GWRp6rV4nJalfpL Lzpe0B/274nYjMkMzh+8xOgDxdkyNOweEJYfzULJu+jFIWARmNJNq1CczCCH3paR RQExE2sF/1UD4ZzVptdI86CQ0k90G8EfDKzxR7QQj7Dyo9uCLGfI4P+njVyRmNCL YqWg58p0bAQF6BF6PEFg8ZwBxuLj2NPc1YJ0R7xt00luT2up0QSoFahv0Gq06/yR SfMfJh/lcB63vpERwgnkubMPn0grhafoS7fLZqZfsXdzphZ0GlNFCKRWs41N5G3l 4KUTnFaoy9AHN4+Dmn/Rn7bGcBQTMQz8cLOtYLO7UngufLW/A2lSNQ== =74TF -----END PGP SIGNATURE-----
couple of tests :
root@test:/etc/mail# sendmail -Am -bv ben@testdomain.com Notice: -bv may give misleading output for non-privileged user test@testdomain.com... deliverable: mailer esmtp, host testdomain.com., user test@testdomain.com .
# echo '$={w}' | sendmail -bt ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter <ruleset> <address>
hostname localhost [127.0.0.1] [xxx.xxx.Xxx.xxx] hostname.testdomain.com
On Thu, 2009-02-19 at 13:45 +0100, ben wrote:
Ok,
aliases file = empty and rebuilded virtusertable = empty + rebuilded sendmail.cw = emtpy added testdomain.com --> relay-domains
I also removed my MAILER(dovecot)dnl entry and adjusted my sendmail.mc to : DOMAIN(
testdomain')dnl MODIFY_MAILER_FLAGS(
LOCAL',-f')dnl FEATURE(
local_procmail',/opt/dovecot/libexec/dovecot/deliver',
deliver -c /opt/dovecot/etc/dovecot.conf -d $u',SPhnu9')dnl define(
confDONT_PROBE_INTERFACES',True')dnl define(
PROCMAIL_MAILER_PATH',/usr/bin/procmail')dnl dnl MAILER(
local')dnl MAILER(smtp')dnl MAILER(
procmail')dnl dnl #MAILER(`dovecot')dnlI also commented in domain.m4 dnl #define(
LOCAL_MAILER_PATH',
/usr/bin/procmail') dnl #define(PROCMAIL_MAILER_PATH',
/usr/bin/procmail')=============
/etc/mail/mailterable : testdomain.com dovecot:dovecot
=============
restarted sendmail and sended a testmail :
I think I have this error becaue local-host-names (sendmail.cw) is emtpy ...
=========LOG==========
Feb 19 13:27:45 hostname sm-mta[1223]: n1JCRXkt001223: from=test@testdomain.com, size=5, class=0, nrcpts=1, msgid=<200902191227.n1JCRXkt001223@hostname.xxxxx. com>, proto=SMTP, daemon=MTA, relay=localhost [127.0.0.1] Feb 19 13:27:46 hostname sm-mta[1223]: n1JCRXkt001223: SYSERR(root): mail.testdomain.com. config error: mail loops back to me (MX problem?) Feb 19 13:27:46 hostname sm-mta[1223]: n1JCRXkt001223: to=test@testdomain.com, delay=0 0:00:04, xdelay=00:00:01, mailer=esmtp, pri=30005, relay=mail.testdomain.com. [195.207 .136.102], dsn=5.3.5, stat=Local configuration error Feb 19 13:27:46 hostname sm-mta[1225]: n1JCRjV1001225: hostname.xxxxx.com [195 .207.136.102] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA Feb 19 13:27:46 hostname sm-mta[1223]: n1JCRXkt001223: to=postmaster, delay=00:0 0:04, mailer=local, pri=30005, dsn=5.1.1, stat=User unknown Feb 19 13:27:46 hostname sm-mta[1223]: n1JCRXkt001223: n1JCRXku001223: DSN: User unknown Feb 19 13:27:51 hostname sm-mta[1223]: STARTTLS=client, relay=mail.testdomain.co m., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256 Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXku001223: to=test@testdomain.com, d elay=00:00:06, xdelay=00:00:06, mailer=esmtp, pri=31029, relay=mail.testdomain.c om. [xxx.xxx.xxx.xxx], dsn=2.0.0, stat=Sent (n1JCQXWE016132 Message accepted for delivery) Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXku001223: to=MAILER-DAEMON, delay=0 0:00:06, mailer=local, pri=31029, dsn=5.1.1, stat=User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXku001223: to=postmaster, delay=00:0 0:06, mailer=local, pri=31029, dsn=5.1.1, stat=User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXku001223: n1JCRXkv001223: return to sender: User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkv001223: to=MAILER-DAEMON, delay=0 0:00:00, mailer=local, pri=2053, dsn=5.1.1, stat=User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXku001223: Losing ./qfn1JCRXku001223 : savemail panic Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXku001223: SYSERR(root): savemail: c annot save rejected email anywhere Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkt001223: to=Postmaster, delay=00:0 0:10, mailer=local, pri=30005, dsn=5.1.1, stat=User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkt001223: n1JCRXkw001223: postmaste r notify: User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkw001223: to=MAILER-DAEMON, delay=0 0:00:00, mailer=local, pri=0, dsn=5.1.1, stat=User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkw001223: to=postmaster, delay=00:0 0:00, mailer=local, pri=0, dsn=5.1.1, stat=User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkw001223: n1JCRXkx001223: return to sender: User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkx001223: to=MAILER-DAEMON, delay=0 0:00:00, mailer=local, pri=0, dsn=5.1.1, stat=User unknown Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkw001223: Losing ./qfn1JCRXkw001223 : savemail panic Feb 19 13:27:52 hostname sm-mta[1223]: n1JCRXkw001223: SYSERR(root): savemail: c annot save rejected email anywhere
=========END==========
On Thu, 2009-02-19 at 12:48 +0100, Steffen Kaiser wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 19 Feb 2009, ben wrote:
aliases/aliases.db :
blaatuser | /opt/dovecot/libexec/dovecot/deliver -d $u
In my eyes, there are two problems here:
- This line should read
blaatuser: "| /opt..."
- you cannot use $u in aliases
Also, delivering in Aliases means that sendmail is using a non-root / non-virtuser-uid UID. So you probably have to SetUID-root deliver, in order to give deliver a) permission to the auth socket and b) permission to spool the message into the mailbox.
====
Actually you never told sendmail to use the dovecot: mailer you've configured.
Remove both the virtuser and alias entry, so sendmail even tries to hit mailertable you have configuered the dovecot: mailer in.
Also, remove the domain from local-host-names and place it into relay-domains.
Check the requireness of SetUID-root of deliver. (s. above)
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBSZ1G9HWSIuGy1ktrAQL9fwf8CLD+bMo6C5GrLSiZ1GWRp6rV4nJalfpL Lzpe0B/274nYjMkMzh+8xOgDxdkyNOweEJYfzULJu+jFIWARmNJNq1CczCCH3paR RQExE2sF/1UD4ZzVptdI86CQ0k90G8EfDKzxR7QQj7Dyo9uCLGfI4P+njVyRmNCL YqWg58p0bAQF6BF6PEFg8ZwBxuLj2NPc1YJ0R7xt00luT2up0QSoFahv0Gq06/yR SfMfJh/lcB63vpERwgnkubMPn0grhafoS7fLZqZfsXdzphZ0GlNFCKRWs41N5G3l 4KUTnFaoy9AHN4+Dmn/Rn7bGcBQTMQz8cLOtYLO7UngufLW/A2lSNQ== =74TF -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 19 Feb 2009, ben wrote:
you need to make sure first, which way to go (see below). Also check out post by "[pl>en Andrew] Andrzej Adam Filip" in comp.mail.sendmail about Dovecot, he is good :)
aliases file = empty and rebuilded virtusertable = empty + rebuilded sendmail.cw = emtpy added testdomain.com --> relay-domains
I also removed my MAILER(dovecot)dnl entry and adjusted my sendmail.mc
You _want_ to use the dovecot: mailer after all, don't you?
to : DOMAIN(
testdomain')dnl MODIFY_MAILER_FLAGS(
LOCAL',-f')dnl FEATURE(
local_procmail',/opt/dovecot/libexec/dovecot/deliver',
deliver -c /opt/dovecot/etc/dovecot.conf -d $u',SPhnu9')dnl define(
confDONT_PROBE_INTERFACES',True')dnl define(
PROCMAIL_MAILER_PATH',/usr/bin/procmail')dnl dnl MAILER(
local')dnl MAILER(smtp')dnl MAILER(
procmail')dnl dnl #MAILER(`dovecot')dnl
This is the other approach by replacing the procmail LDA. In this case testmail.com has to go into local-host-names ;-)
In Debian these lines are sufficient for local domains:
dnl -f $g -- sender
dnl -d $u -- destination user account name
dnl -m $h -- mailbox to deliver to (+detail part of address)
dnl -n -- don't create new mailbox
FEATURE(local_procmail',
/etc/mail/smrsh/dovecot-deliver',
/etc/mail/smrsh/dovecot-deliver -f $g -d $u')dnl MAILER_DEFINITIONS MAILER(
local')dnl
MAILER(`smtp')dnl
No need to specify procmail etc. Check the results in sendmail.cf:
Mlocal, P=/etc/mail/smrsh/dovecot-deliver, F=lsDFMAw5:/|@qSPfhn9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix, A=/etc/mail/smrsh/dovecot-deliver -f $g -d $u
No procmail in there, except in various comments. However, I have experience with virtual users in this scenario.
You have to choose, whether you can replace the LDA for all users (local_procmail approach) or need to pick Dovecot for specific users (aka domains) -> dovecot: mailer approach.
=============
/etc/mail/mailterable : testdomain.com dovecot:dovecot
Do you use mailertable and relay-domains?? For the dovecot: mailer approach only.
FEATURE(mailertable')dnl define(
confCR_FILE', `/etc/mail/relayonly-relay-domains')dnl
I think I have this error becaue local-host-names (sendmail.cw) is emtpy ...
see echo \$=w | sendmail -d0.1 -bt
you should see at least localhost, the $(hostname) and the interfaces in brackets.
=========LOG==========
Feb 19 13:27:45 hostname sm-mta[1223]: n1JCRXkt001223: from=test@testdomain.com, size=5, class=0, nrcpts=1, msgid=<200902191227.n1JCRXkt001223@hostname.xxxxx. com>, proto=SMTP, daemon=MTA, relay=localhost [127.0.0.1] Feb 19 13:27:46 hostname sm-mta[1223]: n1JCRXkt001223: SYSERR(root): mail.testdomain.com. config error: mail loops back to me (MX problem?) Feb 19 13:27:46 hostname sm-mta[1223]: n1JCRXkt001223: to=test@testdomain.com, delay=0 0:00:04, xdelay=00:00:01, mailer=esmtp, pri=30005, relay=mail.testdomain.com. [195.207 .136.102], dsn=5.3.5, stat=Local configuration error
Mailertable does not kick in, you have no FEATURE(`mailertable')dnl I guess. Therefore the default esmtp: mailer gets used.
trace with: sendmail -d60.5 -bv addr@testdom.com
map_lookup(dequote, root, %0=root) => NOT FOUND (0) map_lookup(host, testdom.com, %0=testdom.com) => testdom.com. (0) map_lookup(virtuser, user@testdom.com, %0=user@testdom.com, %1=user) => NOT FOUND (68) map_lookup(virtuser, @testdom.com, %0=@testdom.com, %1=user) => NOT FOUND (68) map_lookup(mailertable, testdom.com, %0=testdom.com) => esmtp:testdom.com (0) user@testdom.com... deliverable: mailer esmtp, host testdom.com, user user@testdom.com
If I had testdom.com in mailertable, the result would override the esmtp output.
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBSZ1jtnWSIuGy1ktrAQK6eggAlvv+kcePZVOGhS/sagm+lP2N6RRKObqm jED4ulfI47mwcumCRnh40Y1FD4B4zTMLjPKNocdkPh8ibjOEowK5fXxMwx0EPhr9 c+kaYbKdOxsiCrbGR0/uyOeKQR3RpMxGuW/6Iw0r/mSFmpSTYvODCCD42lZkJ0s6 yvzO/hGxVywbyW5ZlJmAEYpBkRsqyVZuyeCnsm4cKvaQsVHa/9wNt/gkhbnTeV36 GqewDfItcsVRUWlaMA3Md/eATeGMN0Pv2Bn3xAIwiWXGfC/sa9CA5N5rkm3iX5O1 chFXuUHMjwI9bdIdyKEJe1WVQ3BaU/Fplh1URLSxzRxk5HYKqco1TQ== =O8su -----END PGP SIGNATURE-----
all is working fine, we fixed it by adding our own auth mechanism in mbdb.c (sendmail)... he looks up user/pass instead of /etc/passwd in /opt/dovecot/etc/passwd.dovecot now
alias file = empty virtusertable = empty mailertable = empty
for more info look at the book sendmail performance tuning...
On Thu, 2009-02-19 at 14:50 +0100, Steffen Kaiser wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 19 Feb 2009, ben wrote:
you need to make sure first, which way to go (see below). Also check out post by "[pl>en Andrew] Andrzej Adam Filip" in comp.mail.sendmail about Dovecot, he is good :)
aliases file = empty and rebuilded virtusertable = empty + rebuilded sendmail.cw = emtpy added testdomain.com --> relay-domains
I also removed my MAILER(dovecot)dnl entry and adjusted my sendmail.mc
You _want_ to use the dovecot: mailer after all, don't you?
to : DOMAIN(
testdomain')dnl MODIFY_MAILER_FLAGS(
LOCAL',-f')dnl FEATURE(
local_procmail',/opt/dovecot/libexec/dovecot/deliver',
deliver -c /opt/dovecot/etc/dovecot.conf -d $u',SPhnu9')dnl define(
confDONT_PROBE_INTERFACES',True')dnl define(
PROCMAIL_MAILER_PATH',/usr/bin/procmail')dnl dnl MAILER(
local')dnl MAILER(smtp')dnl MAILER(
procmail')dnl dnl #MAILER(`dovecot')dnlThis is the other approach by replacing the procmail LDA. In this case testmail.com has to go into local-host-names ;-)
In Debian these lines are sufficient for local domains: dnl -f $g -- sender dnl -d $u -- destination user account name dnl -m $h -- mailbox to deliver to (+detail part of address) dnl -n -- don't create new mailbox FEATURE(
local_procmail',
/etc/mail/smrsh/dovecot-deliver',/etc/mail/smrsh/dovecot-deliver -f $g -d $u')dnl MAILER_DEFINITIONS MAILER(
local')dnl MAILER(`smtp')dnlNo need to specify procmail etc. Check the results in sendmail.cf:
Mlocal, P=/etc/mail/smrsh/dovecot-deliver, F=lsDFMAw5:/|@qSPfhn9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix, A=/etc/mail/smrsh/dovecot-deliver -f $g -d $u
No procmail in there, except in various comments. However, I have experience with virtual users in this scenario.
You have to choose, whether you can replace the LDA for all users (local_procmail approach) or need to pick Dovecot for specific users (aka domains) -> dovecot: mailer approach.
=============
/etc/mail/mailterable : testdomain.com dovecot:dovecot
Do you use mailertable and relay-domains?? For the dovecot: mailer approach only.
FEATURE(
mailertable')dnl define(
confCR_FILE', `/etc/mail/relayonly-relay-domains')dnlI think I have this error becaue local-host-names (sendmail.cw) is emtpy ...
see echo \$=w | sendmail -d0.1 -bt
you should see at least localhost, the $(hostname) and the interfaces in brackets.
=========LOG==========
Feb 19 13:27:45 hostname sm-mta[1223]: n1JCRXkt001223: from=test@testdomain.com, size=5, class=0, nrcpts=1, msgid=<200902191227.n1JCRXkt001223@hostname.xxxxx. com>, proto=SMTP, daemon=MTA, relay=localhost [127.0.0.1] Feb 19 13:27:46 hostname sm-mta[1223]: n1JCRXkt001223: SYSERR(root): mail.testdomain.com. config error: mail loops back to me (MX problem?) Feb 19 13:27:46 hostname sm-mta[1223]: n1JCRXkt001223: to=test@testdomain.com, delay=0 0:00:04, xdelay=00:00:01, mailer=esmtp, pri=30005, relay=mail.testdomain.com. [195.207 .136.102], dsn=5.3.5, stat=Local configuration error
Mailertable does not kick in, you have no FEATURE(`mailertable')dnl I guess. Therefore the default esmtp: mailer gets used.
trace with: sendmail -d60.5 -bv addr@testdom.com
map_lookup(dequote, root, %0=root) => NOT FOUND (0) map_lookup(host, testdom.com, %0=testdom.com) => testdom.com. (0) map_lookup(virtuser, user@testdom.com, %0=user@testdom.com, %1=user) => NOT FOUND (68) map_lookup(virtuser, @testdom.com, %0=@testdom.com, %1=user) => NOT FOUND (68) map_lookup(mailertable, testdom.com, %0=testdom.com) => esmtp:testdom.com (0) user@testdom.com... deliverable: mailer esmtp, host testdom.com, user user@testdom.com
If I had testdom.com in mailertable, the result would override the esmtp output.
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBSZ1jtnWSIuGy1ktrAQK6eggAlvv+kcePZVOGhS/sagm+lP2N6RRKObqm jED4ulfI47mwcumCRnh40Y1FD4B4zTMLjPKNocdkPh8ibjOEowK5fXxMwx0EPhr9 c+kaYbKdOxsiCrbGR0/uyOeKQR3RpMxGuW/6Iw0r/mSFmpSTYvODCCD42lZkJ0s6 yvzO/hGxVywbyW5ZlJmAEYpBkRsqyVZuyeCnsm4cKvaQsVHa/9wNt/gkhbnTeV36 GqewDfItcsVRUWlaMA3Md/eATeGMN0Pv2Bn3xAIwiWXGfC/sa9CA5N5rkm3iX5O1 chFXuUHMjwI9bdIdyKEJe1WVQ3BaU/Fplh1URLSxzRxk5HYKqco1TQ== =O8su -----END PGP SIGNATURE-----
participants (2)
-
ben
-
Steffen Kaiser