PROCOM-REDES
asked on
Setup catchall mail for sendmail
Hi all,
I' am trying to setting up catchall - accounts for each virtualdomain hosted on our servers.
in /etc/mail/virtusertable y have
@domain catchall@domain.com
@domain1 catchall@domain1.com
When y try to send mailnoexist@domain.com, then syslog says:
"SYSERR(root): rewrite: excessive recursion (max 50), ruleset canonify"
If I use an email address for a domain not hosted on this system (like catchall@otherdomain.com) as the recipient, then sendmail sends all mails, also those for existing users to catchall@otherdomain.com.
What I make wrong ?
Thanks for help!
I' am trying to setting up catchall - accounts for each virtualdomain hosted on our servers.
in /etc/mail/virtusertable y have
@domain catchall@domain.com
@domain1 catchall@domain1.com
When y try to send mailnoexist@domain.com, then syslog says:
"SYSERR(root): rewrite: excessive recursion (max 50), ruleset canonify"
If I use an email address for a domain not hosted on this system (like catchall@otherdomain.com) as the recipient, then sendmail sends all mails, also those for existing users to catchall@otherdomain.com.
What I make wrong ?
Thanks for help!
ASKER
Hi,
This mean that I must setup virtusertable with all valid useraccounts present in a Domain ?
admin@domain.tld admin
joe@domain.tld joe
foo@domain.tld foot
@domain.tld catchall
Right ?
regards
This mean that I must setup virtusertable with all valid useraccounts present in a Domain ?
admin@domain.tld admin
joe@domain.tld joe
foo@domain.tld foot
@domain.tld catchall
Right ?
regards
Yes. The chatch all simply means that any address not present in the virtuser table will resolve to the catchall destination.
ASKER
OK, but....
Imagin a very very large mailsystem with hundreds of users in one or more domains.....
Is there an other solution more flexible and easier to manage than virtusertable ?
Thanks for your help!
Imagin a very very large mailsystem with hundreds of users in one or more domains.....
Is there an other solution more flexible and easier to manage than virtusertable ?
Thanks for your help!
ASKER
Hi,
Other problem with catchall account for multiple domains.
I setup up for the primary domain "domain.tld":
admin@domain.tld admin
joe@domain.tld joe
foo@domain.tld foo
@domain.tld catchall
and it works fine when I send mail to a non existent user in that domain.
Now, I would like to setup in virtusertable the same for all other domains:
webmaster@newdomain.tld webmaster
@newdomain.tld catchall
webmaster@othernewdomain.t ld webmaster
@othernewdomain.tld catchall
...
...
...
sendmail reject the mail for whatever@newdomain.tld whatever@othernewdomain.tl d with the error "user unknown" and do not redirect the unknown recpient to catchall account.
Why ???
Need urgently a solution! Thanks
Other problem with catchall account for multiple domains.
I setup up for the primary domain "domain.tld":
admin@domain.tld admin
joe@domain.tld joe
foo@domain.tld foo
@domain.tld catchall
and it works fine when I send mail to a non existent user in that domain.
Now, I would like to setup in virtusertable the same for all other domains:
webmaster@newdomain.tld webmaster
@newdomain.tld catchall
webmaster@othernewdomain.t
@othernewdomain.tld catchall
...
...
...
sendmail reject the mail for whatever@newdomain.tld whatever@othernewdomain.tl
Why ???
Need urgently a solution! Thanks
After you added the new data to virtusertable did you re-make the map (usually 'makemap hash /etc/mail/virtusertable </etc/mail/virtusertable') ?
Also did you add newdomain.tld & othernewdomain.tld to /etc/mail/local-host-names and restart sendmail?
Also did you add newdomain.tld & othernewdomain.tld to /etc/mail/local-host-names
ASKER
Yes,
othernewdomain.com is present in local-host-names:
mail.othernewdomain.tld
virtusertable:
catchall@othernewdomain.tl d catchall
@othernewdomain.tld catchall
and hashed: with makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable
MX record is also correct:
..
..
..
MX 10 mail.othernewdomain.tld.
@ IN A 194.224.164.3
www IN A 194.224.164.3
mail IN A 194.224.164.3
relay-domains:
othernewdomain.tld
and the most important for my system, mailertable:
othernewdomain.tld cyrusv2d:/var/local/imap/s ocket/lmtp
It is all present and I can't understand why it only works for the primary domain.
regards
othernewdomain.com is present in local-host-names:
mail.othernewdomain.tld
virtusertable:
catchall@othernewdomain.tl
@othernewdomain.tld catchall
and hashed: with makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable
MX record is also correct:
..
..
..
MX 10 mail.othernewdomain.tld.
@ IN A 194.224.164.3
www IN A 194.224.164.3
mail IN A 194.224.164.3
relay-domains:
othernewdomain.tld
and the most important for my system, mailertable:
othernewdomain.tld cyrusv2d:/var/local/imap/s
It is all present and I can't understand why it only works for the primary domain.
regards
local-host-names should contain:
mail.othernewdom.tld
othernewdomain.tld
When using virtusertable relay-domains should be empty. And when using Cyrus the defintion of the cyrus mailer must be done in sendmail.mc and a new sendmail.cf built. For local accounts in Cyrus mailertable needs to also be an empty file unless you are using Cyrus' virtual domain support.
With a mailertable definition pointing to the lmtp socket mail of otherdomain is going straight to Cyrus and bypassing virtusertable. This means that you would have created accounts in Cyrus for webmaster@othernewdomain.t ld and oan other users in otherdomain.tld. As far as I know there's no provision in the Cyrus virtual domain support for catchall's
mail.othernewdom.tld
othernewdomain.tld
When using virtusertable relay-domains should be empty. And when using Cyrus the defintion of the cyrus mailer must be done in sendmail.mc and a new sendmail.cf built. For local accounts in Cyrus mailertable needs to also be an empty file unless you are using Cyrus' virtual domain support.
With a mailertable definition pointing to the lmtp socket mail of otherdomain is going straight to Cyrus and bypassing virtusertable. This means that you would have created accounts in Cyrus for webmaster@othernewdomain.t
ASKER
I need to solve this problem but I cannot figure it out by my self. All documentation I ve found dont help. I am sure that I have the entire system correctly configured because it works all fine, all nice and realy powerfull !
The only thing that doesnt work is the catchall issue. Please have a look on the following systemconfiguration. Maybe you detect something wrong in this config.
OS = Solaris 9 sparc
mailsystem sendmail+cyrus+DB Berkeley+sieve+saslauth
-------------------------- ---------- ---------- ---------- ---------
sendmail 8.13 with TLS/SSL for plaintext authentification, cyrus-sasl-2.1.18 with sasldb2 authentification for DIGEST-MD5
cyrus-imapd-2.2.8 (imapd, pop3) with sieve
Berkeley DB 4.2.52
sendmail.mc
---------------
divert(0)dnl
VERSIONID(`$Id: generic-solaris.mc,v 8.13 2001/06/27 21:46:30 gshapiro Exp $')dnl
OSTYPE(solaris8)dnl
DOMAIN(generic)dnl
define(`confAUTH_OPTIONS', `A p')dnl
define(`confAUTH_MECHANISM S', `LOGIN PLAIN DIGEST-MD5 CRAM-MD5')dnl
TRUST_AUTH_MECH(`LOGIN PLAIN DIGEST-MD5 CRAM-MD5')dnl
define(`confCACERT_PATH',` /usr/local /ssl/priva te')dnl
define(`confCACERT',`/usr/ local/ssl/ private/** ********** ********** ****ca.crt ')dnl
define(`confSERVER_CERT',` /usr/local /ssl/priva te/******* ********** ******.crt ')dnl
define(`confSERVER_KEY',`/ usr/local/ ssl/privat e/******** ********** *********. key')dnl
define(`confBIND_OPTS',`-D NSRCH -DEFNAMES')dnl
define(`confTO_IDENT',`0') dnl
define(`confLOCAL_MAILER', `cyrusv2d')dnl
define(`CYRUS_MAILER_FLAGS ', `SA5@')dnl
define(`CYRUS_BB_MAILER_FL AGS', `S')dnl
define(`PROCMAIL_MAILER_PA TH',`/opt/ sfw/bin/pr ocmail')dn l
define(`CYRUS_LMTP_SOCKET' ,`/var/loc al/imap/so cket/lmtp' )dnl
define(`confSMTP_LOGIN_MSG ', `')dnl
define(`confPRIVACY_FLAGS' , `authwarnings,goaway,noetr n')dnl
define(`confCOPY_ERRORS_TO ', `admin')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/etc/mail/statistics')dnl
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
DAEMON_OPTIONS(`Port=465, Name=TLSMTA, M=s')dnl
FEATURE(`preserve_local_pl us_detail' )dnl
FEATURE(virtusertable, hash /etc/mail/virtusertable)dn l
FEATURE(mailertable, hash /etc/mail/mailertable)dnl
FEATURE(domaintable, hash /etc/mail/domaintable)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(`nocanonify')dnl
FEATURE(`always_add_domain ')dnl
FEATURE(`dnsbl',`blackhole s.mail-abu se.org',`M ail Rejected. See http://www.mail-abuse.org')dnl
FEATURE(`dnsbl',`relays.or db.org',`M ail Rejected. See http://relays.ordb.org')dnl
FEATURE(`dnsbl',`bl.spamco p.net',`Ma il Rejected. See http://www.spamcop.net')dnl
FEATURE(local_procmail,`', `procmail -t -Y -a $h -d $u')dnl
FEATURE(access_db, hash -T<TMPF> /etc/mail/access)dnl
FEATURE(`blacklist_recipie nts')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(cyrusv2d)dnl
imapd.conf
----------------
configdirectory: /var/local/imap
partition-default: /var/spool/imap
sievedir: /usr/local/sieve
sendmail: /usr/lib/sendmail
unixhierarchysep: yes
admins: userid
sieve_admins: userid
sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: sasldb
tls_cert_file: /var/local/imap/********** ********** ***.crt
tls_key_file: /var/local/imap/********** ********** *****.key
tls_ca_file: /var/local/imap/********** ********** ********** .crt
virtdomains: yes
defaultdomain: primary.tld
loginuseacl: yes
allowplaintext: no
allowanonymouslogin: no
autocreatequota: -1
quotawarn: 90
cyrus.conf
---------------
START {
# do not delete this entry!
recover cmd="ctl_cyrusdb -r"
# this is only necessary if using idled for IMAP IDLE
# idled cmd="idled"
}
# UNIX sockets start with a slash and are put into /var/imap/socket
SERVICES {
# add or remove based on preferences
imap cmd="imapd" listen="imap" prefork=0
imaps cmd="imapd -s" listen="imaps" prefork=0
pop3 cmd="pop3d" listen="pop3" prefork=0
pop3s cmd="pop3d -s" listen="pop3s" prefork=0
sieve cmd="timsieved" listen="sieve" prefork=0
# these are only necessary if receiving/exporting usenet via NNTP
# nntp cmd="nntpd" listen="nntp" prefork=0
# nntps cmd="nntpd -s" listen="nntps" prefork=0
# at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/local/imap/so cket/lmtp" prefork=0
# this is only necessary if using notifications
notify cmd="notifyd" listen="/var/local/imap/so cket/notif y" proto="udp" prefork=1
}
EVENTS {
# this is required
checkpoint cmd="ctl_cyrusdb -c" period=30
# this is only necessary if using duplicate delivery suppression,
# Sieve or NNTP
delprune cmd="cyr_expire -E 3" at=0400
# this is only necessary if caching TLS sessions
tlsprune cmd="tls_prune" at=0400
# purge trash every day at midnight
purgejunk cmd="ipurge -d 6 -f */*/Junk*" period=8640
}
mailertable
-------------
subdomain.primary.tld cyrusv2d:/var/local/imap/s ocket/lmtp
otherdomain.tld cyrusv2d:/var/local/imap/s ocket/lmtp
newother.tld cyrusv2d:/var/local/imap/s ocket/lmtp
relay-domains
--------------------
subdomain.primary.tld
otherdomain.tld
newother.tld
local-host-names
-------------------------
localhost
virtusertable
-----------------
admin@subdomain.primary.tl d admin
root@subdomain.primary.tld root
postmaster@subdomain.prima ry.tld postmaster
catchall@subdomain.primary .tld catchall
@subdomain.primary.tld catchall
webmaster@otherdomain.tld webmaster
catchall@otherdomain.tld catchall
@otherdomain.tld catchall
webmaster@newother.tld webmaster
catchall@newother.tld catchall
@newother.tld catchall
Thanks for any help......
The only thing that doesnt work is the catchall issue. Please have a look on the following systemconfiguration. Maybe you detect something wrong in this config.
OS = Solaris 9 sparc
mailsystem sendmail+cyrus+DB Berkeley+sieve+saslauth
--------------------------
sendmail 8.13 with TLS/SSL for plaintext authentification, cyrus-sasl-2.1.18 with sasldb2 authentification for DIGEST-MD5
cyrus-imapd-2.2.8 (imapd, pop3) with sieve
Berkeley DB 4.2.52
sendmail.mc
---------------
divert(0)dnl
VERSIONID(`$Id: generic-solaris.mc,v 8.13 2001/06/27 21:46:30 gshapiro Exp $')dnl
OSTYPE(solaris8)dnl
DOMAIN(generic)dnl
define(`confAUTH_OPTIONS',
define(`confAUTH_MECHANISM
TRUST_AUTH_MECH(`LOGIN PLAIN DIGEST-MD5 CRAM-MD5')dnl
define(`confCACERT_PATH',`
define(`confCACERT',`/usr/
define(`confSERVER_CERT',`
define(`confSERVER_KEY',`/
define(`confBIND_OPTS',`-D
define(`confTO_IDENT',`0')
define(`confLOCAL_MAILER',
define(`CYRUS_MAILER_FLAGS
define(`CYRUS_BB_MAILER_FL
define(`PROCMAIL_MAILER_PA
define(`CYRUS_LMTP_SOCKET'
define(`confSMTP_LOGIN_MSG
define(`confPRIVACY_FLAGS'
define(`confCOPY_ERRORS_TO
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/etc/mail/statistics')dnl
DAEMON_OPTIONS(`Port=smtp,
DAEMON_OPTIONS(`Port=465, Name=TLSMTA, M=s')dnl
FEATURE(`preserve_local_pl
FEATURE(virtusertable, hash /etc/mail/virtusertable)dn
FEATURE(mailertable, hash /etc/mail/mailertable)dnl
FEATURE(domaintable, hash /etc/mail/domaintable)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(`nocanonify')dnl
FEATURE(`always_add_domain
FEATURE(`dnsbl',`blackhole
FEATURE(`dnsbl',`relays.or
FEATURE(`dnsbl',`bl.spamco
FEATURE(local_procmail,`',
FEATURE(access_db, hash -T<TMPF> /etc/mail/access)dnl
FEATURE(`blacklist_recipie
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(cyrusv2d)dnl
imapd.conf
----------------
configdirectory: /var/local/imap
partition-default: /var/spool/imap
sievedir: /usr/local/sieve
sendmail: /usr/lib/sendmail
unixhierarchysep: yes
admins: userid
sieve_admins: userid
sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: sasldb
tls_cert_file: /var/local/imap/**********
tls_key_file: /var/local/imap/**********
tls_ca_file: /var/local/imap/**********
virtdomains: yes
defaultdomain: primary.tld
loginuseacl: yes
allowplaintext: no
allowanonymouslogin: no
autocreatequota: -1
quotawarn: 90
cyrus.conf
---------------
START {
# do not delete this entry!
recover cmd="ctl_cyrusdb -r"
# this is only necessary if using idled for IMAP IDLE
# idled cmd="idled"
}
# UNIX sockets start with a slash and are put into /var/imap/socket
SERVICES {
# add or remove based on preferences
imap cmd="imapd" listen="imap" prefork=0
imaps cmd="imapd -s" listen="imaps" prefork=0
pop3 cmd="pop3d" listen="pop3" prefork=0
pop3s cmd="pop3d -s" listen="pop3s" prefork=0
sieve cmd="timsieved" listen="sieve" prefork=0
# these are only necessary if receiving/exporting usenet via NNTP
# nntp cmd="nntpd" listen="nntp" prefork=0
# nntps cmd="nntpd -s" listen="nntps" prefork=0
# at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/local/imap/so
# this is only necessary if using notifications
notify cmd="notifyd" listen="/var/local/imap/so
}
EVENTS {
# this is required
checkpoint cmd="ctl_cyrusdb -c" period=30
# this is only necessary if using duplicate delivery suppression,
# Sieve or NNTP
delprune cmd="cyr_expire -E 3" at=0400
# this is only necessary if caching TLS sessions
tlsprune cmd="tls_prune" at=0400
# purge trash every day at midnight
purgejunk cmd="ipurge -d 6 -f */*/Junk*" period=8640
}
mailertable
-------------
subdomain.primary.tld cyrusv2d:/var/local/imap/s
otherdomain.tld cyrusv2d:/var/local/imap/s
newother.tld cyrusv2d:/var/local/imap/s
relay-domains
--------------------
subdomain.primary.tld
otherdomain.tld
newother.tld
local-host-names
-------------------------
localhost
virtusertable
-----------------
admin@subdomain.primary.tl
root@subdomain.primary.tld
postmaster@subdomain.prima
catchall@subdomain.primary
@subdomain.primary.tld catchall
webmaster@otherdomain.tld webmaster
catchall@otherdomain.tld catchall
@otherdomain.tld catchall
webmaster@newother.tld webmaster
catchall@newother.tld catchall
@newother.tld catchall
Thanks for any help......
"virtdomains: yes" in imapd.conf means that you are using the Cyrus virutal domain support. And that in turn means that you don't use virtusertable and must create accounts with cyradm & saslpasswd for the the virutal addresses.
ASKER
I am using cyradm and all mailboxes are created with. So, if virtdomains: yes is the hint for the catchall problem, is there any other way in cyrus to setup catchall accounts for each domain ?
Not so far as I know. Catchall's are only available when Cyrus isn't configured with virtual domain support and routing of mail for virtual addresses is done with virtusertable.
ASKER
Ok, seems to be nobody can't give me a solution. I can't believe that I am the only one with this problem.......
I found something that maybe can solve the problem, but before I make signifcant changes on a production server I would like to ask an "expert":
What you mean about this ?!?!
http://anfi.homeunix.net/sendmail/localNalias.html
I found something that maybe can solve the problem, but before I make signifcant changes on a production server I would like to ask an "expert":
What you mean about this ?!?!
http://anfi.homeunix.net/sendmail/localNalias.html
I don't see haow that would help or work when Cyrus has virtual domain support enabled. In that case Cyrus expects to be given a full email address (user@virt-domain.tld) as the mail account ID. You can't map that through aliases or virtusertable because the rule would have to use the same address as the target, which is a circular definition.
ASKER
well.... is it posible to put a rule in the sendmail.mc for a specific domain to send no existent usermail to a specific mailbox ?
This would be at least a temporal mini solution.
This would be at least a temporal mini solution.
That won't work with a Cyrus mail system. Sendmail doesn't have any knowledge of what users exist, that being entirely the province of Cyrus. I do recall that there is a patch for Sendmail that can reject mail for non-existant Cyrus accounts, but that wouldn't be of much help here. It might be possible to adapt the patch to do something else, but that would seem to be a non-trivial exercise.
IF you want sendmail reject messages to non existing cyrus-imap mailboxes in reply to "RCPT TO:" command
THEN apply http://anfi.homeunix.net/sendmail/localNalias.html
[ instead of http://anfi.homeunix.net/sendmail/localNalias.html ]
THEN apply http://anfi.homeunix.net/sendmail/localNalias.html
[ instead of http://anfi.homeunix.net/sendmail/localNalias.html ]
ASKER
???
THEN apply http://anfi.homeunix.net/sendmail/localNalias.html
[ instead of http://anfi.homeunix.net/sendmail/localNalias.html ]
2 identical URL's !
THEN apply http://anfi.homeunix.net/sendmail/localNalias.html
[ instead of http://anfi.homeunix.net/sendmail/localNalias.html ]
2 identical URL's !
:-)
You are right. Below please find corrected link:
http://anfi.homeunix.net/sendmail/rtcyrus2.html
You are right. Below please find corrected link:
http://anfi.homeunix.net/sendmail/rtcyrus2.html
Yep that's the patch for rejecting mail to unknown users at the Sendmail level, but I don't see how it will help with the stated need for catchall's.
You can use it to redirect message to catchall address if there is no cyrus mailbox:
mailertable entry:
domain mrs_cyrus_mailertable:loca l:catchall
Is it what you want?
mailertable entry:
domain mrs_cyrus_mailertable:loca
Is it what you want?
ASKER
I installed your solution at http://anfi.homeunix.net/sendmail/rtcyrus2.html
But I still unable to redirect non existent user to a global catchall account for each domain:
Now I working only with mailtertable and relay-domains
in mailtertable I have this:
firstdomain.net mrs_cyrus_mailertable:loca l:catchall
seconddomain.com mrs_cyrus_mailertable:loca l:catchall
in relay-domains I have this:
firstdomain.net
seconddomain.net
Testing with sendmail -C sendmail.cf -d60.5 -bv webmaster@firstdomain.net
I receive following output:
map_lookup(dequote, admin, %0=admin) => NOT FOUND (0)
map_lookup(domaintable, firstdomain.net, %0=firstdomain.net) => NOT FOUND (0)
map_lookup(mailertable, firstdomain.net, %0=firstdomain.net) => mrs_cyrus_mailertable:loca l:catchall (0)
map_lookup(cyrus, webmaster@firstdomain.net, %0=webmaster@firstdomain.n et) => webmaster@firstdomain.net< OK> (0)
webmaster@firstdomain.net. .. deliverable: mailer cyrusv2d, host dummy, user webmaster@firstdomain.net
This is OK (I belive) and when sending mail to webmaster@firstdomain.net works fine.
But using an non existent user like "whatever" seems to be work by testing it with
sendmail -C sendmail.cf -d60.5 -bv whatever@seconddomain.net
The output was the following:
map_lookup(dequote, admin, %0=admin) => NOT FOUND (0)
map_lookup(domaintable, seconddomain.net, %0=seconddomain.net) => NOT FOUND (0)
map_lookup(mailertable, seconddomain.net, %0=seconddomain.net) => mrs_cyrus_mailertable:loca l:catchall (0)
map_lookup(cyrus, whatever@seconddomain.net, %0=whatever@seconddomain.n et) => NOT FOUND (68)
whatever@seconddomain.net. .. deliverable: mailer cyrusv2, host whatever@seconddomain.net, user catchall
But If sending mail to that non existent user it doesnt work. Syslog still say user unknown.
What I make wrong ? I forgot something ?
Thanks for any help.
But I still unable to redirect non existent user to a global catchall account for each domain:
Now I working only with mailtertable and relay-domains
in mailtertable I have this:
firstdomain.net mrs_cyrus_mailertable:loca
seconddomain.com mrs_cyrus_mailertable:loca
in relay-domains I have this:
firstdomain.net
seconddomain.net
Testing with sendmail -C sendmail.cf -d60.5 -bv webmaster@firstdomain.net
I receive following output:
map_lookup(dequote, admin, %0=admin) => NOT FOUND (0)
map_lookup(domaintable, firstdomain.net, %0=firstdomain.net) => NOT FOUND (0)
map_lookup(mailertable, firstdomain.net, %0=firstdomain.net) => mrs_cyrus_mailertable:loca
map_lookup(cyrus, webmaster@firstdomain.net,
webmaster@firstdomain.net.
This is OK (I belive) and when sending mail to webmaster@firstdomain.net works fine.
But using an non existent user like "whatever" seems to be work by testing it with
sendmail -C sendmail.cf -d60.5 -bv whatever@seconddomain.net
The output was the following:
map_lookup(dequote, admin, %0=admin) => NOT FOUND (0)
map_lookup(domaintable, seconddomain.net, %0=seconddomain.net) => NOT FOUND (0)
map_lookup(mailertable, seconddomain.net, %0=seconddomain.net) => mrs_cyrus_mailertable:loca
map_lookup(cyrus, whatever@seconddomain.net,
whatever@seconddomain.net.
But If sending mail to that non existent user it doesnt work. Syslog still say user unknown.
What I make wrong ? I forgot something ?
Thanks for any help.
ASKER
Additionaly comment:
When sending mail to an non existent user I got this entry in syslog:
alias database /etc/aliases.db out of date
When sending mail to an non existent user I got this entry in syslog:
alias database /etc/aliases.db out of date
"aliases out of date" can be fixed by running newaliases commans (as root).
The command will recompile "binary aliases" used by sendmail from "text aliases" file.
For more details see "man newaliases"
The command will recompile "binary aliases" used by sendmail from "text aliases" file.
For more details see "man newaliases"
"aliases out of date" => run newaliases command
Mailertable does not work for local email domains (listed in $=w)
Virtusertable works for local email domains ($=w) and domains listed in $={VirtHost}
Check if the domains are listed in $={VirtHost} using the dommand below:
echo '$={VirtHost}' | sendmail -bt
To add the domains to $={VirtHost} add the following lines to sendmail.mc and compile new sendmail.cf:
LOCAL_CONFIG
F{VirtHost}/etc/mail/virtu al-domains
In /etc/mail/virtual-domains file list the domains (one domain per one line):
firstdomain.net
Read *carefully* about side effects of using standard sendmail.org methods of populating $={VirtHost} before using them.
Mailertable does not work for local email domains (listed in $=w)
Virtusertable works for local email domains ($=w) and domains listed in $={VirtHost}
Check if the domains are listed in $={VirtHost} using the dommand below:
echo '$={VirtHost}' | sendmail -bt
To add the domains to $={VirtHost} add the following lines to sendmail.mc and compile new sendmail.cf:
LOCAL_CONFIG
F{VirtHost}/etc/mail/virtu
In /etc/mail/virtual-domains file list the domains (one domain per one line):
firstdomain.net
Read *carefully* about side effects of using standard sendmail.org methods of populating $={VirtHost} before using them.
ASKER
I made this change as you described above, but still not working sending mail to whatever@firstdomain.net:
Nov 22 10:23:17 maschine sm-mta[3846]: [ID 801593 mail.info] iAM9NG2R003846: from=<user@domain.tld>, size=1378, class=0, nrcpts=1, msgid=<EMEBLPCNDKLJADFMKIN OCEEACJAA. user@domai n.tld>, proto=ESMTP, daemon=MTA, relay=smtp.domaindomain.tl d [xxx.xxx.xxx.xxx]
Nov 22 10:23:17 machine sm-mta[3849]: [ID 702911 mail.info] alias database /etc/aliases.db out of date
Nov 22 10:23:17 machine sm-mta[3849]: [ID 801593 mail.info] iAM9NG2R003846: to=<whatever@firstdomain.n et>, delay=00:00:00, xdelay=00:00:00, mailer=cyrusv2, pri=121378, relay=localhost, dsn=5.1.1, stat=User unknown
Nov 22 10:23:17 machine sm-mta[3849]: [ID 801593 mail.info] iAM9NG2R003846: iAM9NH2R003849: DSN: User unknown
Nov 22 10:23:19 machine sm-mta[3849]: [ID 801593 mail.info] iAM9NH2R003849: to=<user@domain.tld>, delay=00:00:02, xdelay=00:00:02, mailer=esmtp, pri=32625, relay=mail.domain.tld. [xxx.xxx.xxx.xxx], dsn=2.0.0, stat=Sent ( Message of 3691 Bytes Accepted for delivery)
Nov 22 10:23:19 machine sm-mta[3849]: [ID 801593 mail.info] iAM9NG2R003846: iAM9NH2S003849: postmaster notify: User unknown
Nov 22 10:23:19 machine sm-mta[3849]: [ID 801593 mail.info] iAM9NH2S003849: to=admin, delay=00:00:00, xdelay=00:00:00, mailer=cyrusv2, pri=30000, relay=localhost [[UNIX: /var/local/imap/socket/lmt p]], dsn=2.0.0, stat=Sent
Nov 22 10:23:17 maschine sm-mta[3846]: [ID 801593 mail.info] iAM9NG2R003846: from=<user@domain.tld>, size=1378, class=0, nrcpts=1, msgid=<EMEBLPCNDKLJADFMKIN
Nov 22 10:23:17 machine sm-mta[3849]: [ID 702911 mail.info] alias database /etc/aliases.db out of date
Nov 22 10:23:17 machine sm-mta[3849]: [ID 801593 mail.info] iAM9NG2R003846: to=<whatever@firstdomain.n
Nov 22 10:23:17 machine sm-mta[3849]: [ID 801593 mail.info] iAM9NG2R003846: iAM9NH2R003849: DSN: User unknown
Nov 22 10:23:19 machine sm-mta[3849]: [ID 801593 mail.info] iAM9NH2R003849: to=<user@domain.tld>, delay=00:00:02, xdelay=00:00:02, mailer=esmtp, pri=32625, relay=mail.domain.tld. [xxx.xxx.xxx.xxx], dsn=2.0.0, stat=Sent ( Message of 3691 Bytes Accepted for delivery)
Nov 22 10:23:19 machine sm-mta[3849]: [ID 801593 mail.info] iAM9NG2R003846: iAM9NH2S003849: postmaster notify: User unknown
Nov 22 10:23:19 machine sm-mta[3849]: [ID 801593 mail.info] iAM9NH2S003849: to=admin, delay=00:00:00, xdelay=00:00:00, mailer=cyrusv2, pri=30000, relay=localhost [[UNIX: /var/local/imap/socket/lmt
ASKER
Setting up cyrus with saslauth and sendmail was very easy, but the catchall problem seems to be the hardes thing for me to solve.
The only thing that I need is that each VIRTUAL DOMAIN have its own catchall mail address to cacht all incoming mails for nonexisten users in each VIRTUAL DOMAIN.
I made all as described in your mrs_cyrus solution (step 1 - 6) and it works if user exist (*):
map_lookup(dequote, admin, %0=admin) => NOT FOUND (0)
map_lookup(domaintable, firstdomain.net, %0=firstdomain.net) => NOT FOUND (0)
map_lookup(mailertable, firstdomain.net, %0=firstdomain.net) => mrs_cyrus_mailertable:loca l:catchall (0)
map_lookup(cyrus, webmaster@firstdomain.net, %0=webmaster@firstdomain.n et) => webmaster@firstdomain.net< OK> (0)
(*)webmaster@firstdomain.n et... deliverable: mailer cyrusv2d, host dummy, user webmaster@firstdomain.net
I dont need this (**), if user not exist:
map_lookup(dequote, admin, %0=admin) => NOT FOUND (0)
map_lookup(domaintable, firstdomain.net, %0=firstdomain.net) => NOT FOUND (0)
map_lookup(mailertable, firstdomain.net, %0=firstdomain.net) => mrs_cyrus_mailertable:loca l:catchall (0)
map_lookup(cyrus, nonexist@firstdomain.net, %0=nonexist@firstdomain.ne t) => NOT FOUND (68)
(**) nonexist@firstdomain.net.. . deliverable: mailer cyrusv2, host nonexist@firstdomain.net, user catchall
I need this (****):
(****) nonexist@firstdomain.net.. . deliverable: mailer cyrusv2d, host dummy, user catchall@firstdomain.net
QUESTION:
Is this posible with your mrs_cyrus solution ? And if, what more I need exactly ?
Thanks for any reply to solve this problem.
The only thing that I need is that each VIRTUAL DOMAIN have its own catchall mail address to cacht all incoming mails for nonexisten users in each VIRTUAL DOMAIN.
I made all as described in your mrs_cyrus solution (step 1 - 6) and it works if user exist (*):
map_lookup(dequote, admin, %0=admin) => NOT FOUND (0)
map_lookup(domaintable, firstdomain.net, %0=firstdomain.net) => NOT FOUND (0)
map_lookup(mailertable, firstdomain.net, %0=firstdomain.net) => mrs_cyrus_mailertable:loca
map_lookup(cyrus, webmaster@firstdomain.net,
(*)webmaster@firstdomain.n
I dont need this (**), if user not exist:
map_lookup(dequote, admin, %0=admin) => NOT FOUND (0)
map_lookup(domaintable, firstdomain.net, %0=firstdomain.net) => NOT FOUND (0)
map_lookup(mailertable, firstdomain.net, %0=firstdomain.net) => mrs_cyrus_mailertable:loca
map_lookup(cyrus, nonexist@firstdomain.net, %0=nonexist@firstdomain.ne
(**) nonexist@firstdomain.net..
I need this (****):
(****) nonexist@firstdomain.net..
QUESTION:
Is this posible with your mrs_cyrus solution ? And if, what more I need exactly ?
Thanks for any reply to solve this problem.
ASKER
SOLVED by my self.
For all other peoples with the same problem: "catchall accounts for virtualdomains with sendmail 8.13.x and cyrus 2.2.x"
1. Install Andrzej Filip mrs_cyrus solution at http://anfi.homeunix.net/sendmail/rtcyrus2.html step 1 - 5
2. in sendmail.mc put:
dnl (host.domain.tld, send mail to user@host.domain.tld) dnl
define(`confLOCAL_MAILER', `cyrusv2d')dnl
dnl OR, for your localdomain (send mail to user) dnl
define(`confLOCAL_MAILER', `cyrusv2')dnl
define(`CYRUS_MAILER_FLAGS ', `SA5@')dnl
define(`CYRUS_BB_MAILER_FL AGS', `S')dnl
define(`CYRUS_LMTP_SOCKET' ,`/var/ima p/socket/l mtp')dnl
define(`LOCAL_RELAY', `mrs_cyrus_mailertable:dum my')
FEATURE(mailertable, hash /etc/mail/mailertable)dnl
FEATURE(`mrs')dnl
FEATURE(`mrs_cyrus',`/var/ local/imap /socket/sm mapd')dnl
MODIFY_MAILER_FLAGS(`CYRUS V2',`-A5') dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(cyrusv2)dnl
3. mailertable
All what you need in mailertable for each virtualdomain with catchall account:
domain1.tld mrs_cyrus_mailertable:cyru sv2d:catch all@domain 1.tld
domain5.tld mrs_cyrus_mailertable:cyru sv2d:catch all@domain 5.tld
For domains without catchall mail put this:
domain8.tld cyrusv2d:/var/imap/socket/ lmtp
Feedback from anfi and jlevie is welcome
cheers
For all other peoples with the same problem: "catchall accounts for virtualdomains with sendmail 8.13.x and cyrus 2.2.x"
1. Install Andrzej Filip mrs_cyrus solution at http://anfi.homeunix.net/sendmail/rtcyrus2.html step 1 - 5
2. in sendmail.mc put:
dnl (host.domain.tld, send mail to user@host.domain.tld) dnl
define(`confLOCAL_MAILER',
dnl OR, for your localdomain (send mail to user) dnl
define(`confLOCAL_MAILER',
define(`CYRUS_MAILER_FLAGS
define(`CYRUS_BB_MAILER_FL
define(`CYRUS_LMTP_SOCKET'
define(`LOCAL_RELAY', `mrs_cyrus_mailertable:dum
FEATURE(mailertable, hash /etc/mail/mailertable)dnl
FEATURE(`mrs')dnl
FEATURE(`mrs_cyrus',`/var/
MODIFY_MAILER_FLAGS(`CYRUS
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(cyrusv2)dnl
3. mailertable
All what you need in mailertable for each virtualdomain with catchall account:
domain1.tld mrs_cyrus_mailertable:cyru
domain5.tld mrs_cyrus_mailertable:cyru
For domains without catchall mail put this:
domain8.tld cyrusv2d:/var/imap/socket/
Feedback from anfi and jlevie is welcome
cheers
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
bill@domain.tld user1
...
@domain.tld some-user
...
joe@domain1.tld user2
...
@domain1.tld some-user
You got the recursion error because the right hand side of the equate contained the domain present in the left hand side. Provided that all other virutal email addresses are enumerated in virtusertable only those that don't match an explict entry will go to the catchall address.