I have been using Cyrus IMAP with Sendmail on the Debian GNU/Linux distribution for some time but have recently experienced a massive increase in junk mail and inability to filter due to the lack of "User unknown" failures on delivery. I believe this is also contributing to backscatter. I was hoping to use a recently deployed LDAP directory for user verification before delivery but it seems this is not that features intended purpose. As such, from combining my previously "over" delivering configuration with the RTcyrus3 modifications I get the following. This appears to test correctly but I just want to be clear on a few of the configuration entries I will note in comments.
...
dnl #ic defined to match /etc/cyrus.conf and Debian requirements.
define(`SMMAP_SOCKET',`/var/run/cyrus/socket/smmapd')dnl
define(`CYRUS_LMTP_SOCKET',`/var/run/cyrus/socket/lmtp')dnl
dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl
dnl #ic should cyrusv2 be defined along with cyrusv3?
MAILER(`cyrusv2')dnl
dnl #ic should confLOCAL_MAILER be defined at all with cyrusv3?
define(`confLOCAL_MAILER', `cyrusv2')dnl
dnl #ic is defining LOCAL_CONFIG twice bad practice and should they be combined?
LOCAL_CONFIG
## Custom configurations below (will be preserved)
FN /etc/mail/sendmail.cN
dnl $Id: MC.rtcyrus3,v 1.1 2007/09/18 20:39:10 anfi Exp $
LOCAL_CONFIG
# list of virtual cyrus domains
C{VCyrusDomains} example.com
divert(-1)
dnl # socket map socket location serviced by cyrus
dnl define(`SMMAP_SOCKET',`/var/imap/socket/smmapd')dnl
dnl # lmtp socket location serviced by cyrus
dnl define(`CYRUS_LMTP_SOCKET',`/var/imap/socket/lmtp')dnl
FEATURE(`anfi/vcyrus')dnl
MAILER(`anfi/cyrusv3')dnl
<EOF>
I am at present using only one Cyrus domain but host several others and plan to implement Cyrus virtual domains in hopes of further reducing junk mail. This seems an appropriate reason to use RTcyrus3 rather than previous versions however any direction is certainly appreciated!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
0) IF you use LDAP directory anywat THEN I would suggest you trying it first http://www.sendmail.org/m4/ldap_routing.html
1) RTCyrus3 is specifically designed for Cyrus IMAP with virtual domains
For "single domain" Cyrus RTCyrus2 may be better
Your "in *.mc" qusetions:
a) should cyrusv2 be defined along with cyrusv3?
It is not necessary for RTCyrus3. MAILER(`anfi/cyrusv3') should be sufficient for RTCyrus3
b) should confLOCAL_MAILER be defined at all with cyrusv3?
It is not necessary for RTCyrus3
c) is defining LOCAL_CONFIG twice bad practice and should they be combined?
It is "less than perfect" style. I would recommend avoiding it in my personal "style guide" but not at any cost
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have spent some time trying to get ldap_routing working as well as several other options however it does not seem possible to use that feature to define users as unknown.
Also, while I am testing RTCyrus3 with only one domain I do have almost a dozen virtual domains that I do intend to use eventually.
Based on your comments I have modified the configuration as follows which seems to be working in my tests, except that "FN /etc/mail/sendmail.cN" and '/etc/mail/aliases' seem to no longer have any affect on mail routing (with mail to root and postmaster not being redirected.)
BTW, thank you for the quick response, I have been following this work and its predecessors for several years now but always thought I could make due without. I really appreciate your comments now that that no longer seems possible.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1) ldap_routing: FEATURE(`ldap_routing',`',`',`bounce') should make sendmail bounce messages to all addresses not listed in LDAP. http://www.sendmail.org/m4/ldap_routing.html
2) masquerading exception (FN) => try to ask via news:comp.mail.sendmail
3) aliase - RTCyrus3 makes sendmail handle "domanized" aliases for the cyrus virtual domains.
Instead of "postmaster: ...." use "postmaster@example.net: ..." entries in aliases
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Do you miss something in RTCyrus3? [I do not use it myself in "production" environment]
The last thing I wanted to add had been sendmail reject messages to over-quota mailboxes in reply to "RCPT TO:" - it requires some tweaking of sendmail part and cyrus implementation of socket map handler.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have only just begun using RTCyrus3 so I am not entirely sure what might be missing yet though I will be sure to leave feedback here!
I have not yet had a chance to look into the masquerading exception (FN) configuration though I do have a workaround in place that should suffice.
I am actually curious however what you use in a "production" environment if not RTCyrus?
I have only avoided using RTCyrus this long because I was wary of patching Sendmail, has there been any talk of adding this as a feature to Sendmail itself? RTCyrus does seem to be the more straightforward solution over ldap_routing, and all other solutions seem unable to scale much at all. BTW, thanks for the reference to your ldap_routing FEATURE definition, I will have to look into that more as well.
Thanks again! -i
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1) I do not use RTCyrus in "production environment" because I personally do need it in such environment. It is something "simple for me to develop, handy for others to use".
2) Feel free to convice sendmail.org to include it in sendmail.org distribution.
[ see "1" why I do not push it myself ] I give "in advance acceptance" valid this year (2009).
The really crucial part is making sendmail.org include cf/m4/proto.m4 patches to sendmail.org distribution.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been using Cyrus IMAP with Sendmail on the Debian GNU/Linux distribution for some time but have recently experienced a massive increase in junk mail and inability to filter due to the lack of "User unknown" failures on delivery. I believe this is also contributing to backscatter. I was hoping to use a recently deployed LDAP directory for user verification before delivery but it seems this is not that features intended purpose. As such, from combining my previously "over" delivering configuration with the RTcyrus3 modifications I get the following. This appears to test correctly but I just want to be clear on a few of the configuration entries I will note in comments.
...
dnl #ic defined to match /etc/cyrus.conf and Debian requirements.
define(`SMMAP_SOCKET',`/var/run/cyrus/socket/smmapd')dnl
define(`CYRUS_LMTP_SOCKET',`/var/run/cyrus/socket/lmtp')dnl
dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl
dnl #ic should cyrusv2 be defined along with cyrusv3?
MAILER(`cyrusv2')dnl
dnl #ic should confLOCAL_MAILER be defined at all with cyrusv3?
define(`confLOCAL_MAILER', `cyrusv2')dnl
dnl #ic is defining LOCAL_CONFIG twice bad practice and should they be combined?
LOCAL_CONFIG
## Custom configurations below (will be preserved)
FN /etc/mail/sendmail.cN
dnl $Id: MC.rtcyrus3,v 1.1 2007/09/18 20:39:10 anfi Exp $
LOCAL_CONFIG
# list of virtual cyrus domains
C{VCyrusDomains} example.com
divert(-1)
dnl # socket map socket location serviced by cyrus
dnl define(`SMMAP_SOCKET',`/var/imap/socket/smmapd')dnl
dnl # lmtp socket location serviced by cyrus
dnl define(`CYRUS_LMTP_SOCKET',`/var/imap/socket/lmtp')dnl
FEATURE(`anfi/vcyrus')dnl
MAILER(`anfi/cyrusv3')dnl
<EOF>
I am at present using only one Cyrus domain but host several others and plan to implement Cyrus virtual domains in hopes of further reducing junk mail. This seems an appropriate reason to use RTcyrus3 rather than previous versions however any direction is certainly appreciated!
0) IF you use LDAP directory anywat THEN I would suggest you trying it first
http://www.sendmail.org/m4/ldap_routing.html
1) RTCyrus3 is specifically designed for Cyrus IMAP with virtual domains
For "single domain" Cyrus RTCyrus2 may be better
Your "in *.mc" qusetions:
a) should cyrusv2 be defined along with cyrusv3?
It is not necessary for RTCyrus3. MAILER(`anfi/cyrusv3') should be sufficient for RTCyrus3
b) should confLOCAL_MAILER be defined at all with cyrusv3?
It is not necessary for RTCyrus3
c) is defining LOCAL_CONFIG twice bad practice and should they be combined?
It is "less than perfect" style. I would recommend avoiding it in my personal "style guide" but not at any cost
I have spent some time trying to get ldap_routing working as well as several other options however it does not seem possible to use that feature to define users as unknown.
Also, while I am testing RTCyrus3 with only one domain I do have almost a dozen virtual domains that I do intend to use eventually.
Based on your comments I have modified the configuration as follows which seems to be working in my tests, except that "FN /etc/mail/sendmail.cN" and '/etc/mail/aliases' seem to no longer have any affect on mail routing (with mail to root and postmaster not being redirected.)
...
LOCAL_CONFIG
## Custom configurations below (will be preserved)
FN /etc/mail/sendmail.cN
dnl $Id: MC.rtcyrus3,v 1.1 2007/09/18 20:39:10 anfi Exp $
dnl LOCAL_CONFIG
dnl # list of virtual cyrus domains
C{VCyrusDomains} example.net example.org
divert(-1)
dnl # socket map socket location serviced by cyrus
define(`SMMAP_SOCKET',`/var/run/cyrus/socket/smmapd')dnl
dnl # lmtp socket location serviced by cyrus
define(`CYRUS_LMTP_SOCKET',`/var/run/cyrus/socket/lmtp')dnl
FEATURE(`anfi/vcyrus')dnl
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl
MAILER(`anfi/cyrusv3')dnl
<EOF>
BTW, thank you for the quick response, I have been following this work and its predecessors for several years now but always thought I could make due without. I really appreciate your comments now that that no longer seems possible.
1) ldap_routing: FEATURE(`ldap_routing',`',`',`bounce') should make sendmail bounce messages to all addresses not listed in LDAP.
http://www.sendmail.org/m4/ldap_routing.html
2) masquerading exception (FN) => try to ask via news:comp.mail.sendmail
3) aliase - RTCyrus3 makes sendmail handle "domanized" aliases for the cyrus virtual domains.
Instead of "postmaster: ...." use "postmaster@example.net: ..." entries in aliases
Do you miss something in RTCyrus3? [I do not use it myself in "production" environment]
The last thing I wanted to add had been sendmail reject messages to over-quota mailboxes in reply to "RCPT TO:" - it requires some tweaking of sendmail part and cyrus implementation of socket map handler.
Andrzej,
I have only just begun using RTCyrus3 so I am not entirely sure what might be missing yet though I will be sure to leave feedback here!
I have not yet had a chance to look into the masquerading exception (FN) configuration though I do have a workaround in place that should suffice.
I am actually curious however what you use in a "production" environment if not RTCyrus?
I have only avoided using RTCyrus this long because I was wary of patching Sendmail, has there been any talk of adding this as a feature to Sendmail itself? RTCyrus does seem to be the more straightforward solution over ldap_routing, and all other solutions seem unable to scale much at all. BTW, thanks for the reference to your ldap_routing FEATURE definition, I will have to look into that more as well.
Thanks again! -i
1) I do not use RTCyrus in "production environment" because I personally do need it in such environment. It is something "simple for me to develop, handy for others to use".
2) Feel free to convice sendmail.org to include it in sendmail.org distribution.
[ see "1" why I do not push it myself ] I give "in advance acceptance" valid this year (2009).
The really crucial part is making sendmail.org include cf/m4/proto.m4 patches to sendmail.org distribution.