Problem with Sendmail 8.13.0 / Cyrus Imap 2.2.6 and virtual hosting

Carl Brewer carl at bl.echidna.id.au
Sun Jul 11 05:06:21 EDT 2004


Hello Jesper,

I'm using sendmail 8.12.11, with Andrzej's stuff, as follows :

VERSIONID(`$Id: rollcage2.mc,v 1.1 2004/05/08 22:42:23 carl Exp carl $')
FEATURE(always_add_domain)dnl
FEATURE(mailertable, hash /etc/mail/mailertable)dnl
FEATURE(virtusertable, hash /etc/mail/virtusertable)dnl
VIRTUSER_DOMAIN_FILE(`/etc/mail/virthosts')dnl
FEATURE(access_db, hash -T<TMPF> /etc/mail/access)dnl
DAEMON_OPTIONS(`Name=MTA-v4, Family=inet')
DAEMON_OPTIONS(`Name=MTA-v6, Family=inet6')
define(`confME_TOO', True)dnl
define(`confTRUSTED_USERS', majordom)dnl

OSTYPE(bsd4.4)dnl
DOMAIN(generic)dnl

INPUT_MAIL_FILTER(`spamassassin', 
`S=local:/var/run/spamass.sock,F=,T=C:15m;S:4m;R:4m;E:10m')
INPUT_MAIL_FILTER(`clmilter',`S=local:/var/run/clamav.sock,F=,T=S:4m;R:4m')dnl
dnl
dnl Enforce valid Message-Id to help stop spammers
dnl
LOCAL_RULESETS
HMessage-Id:    $>CheckMessageId

SCheckMessageId
R< $+ @ $+ >            $@ OK
R$*                     $#error $: 553 Header Error

MAILER(local)
MAILER(smtp)
MAILER(cyrusv2)



/etc/mail/virthosts contains each domain I'm hosting :

rollcage2# more virthosts
bl.echidna.id.au
aboc.com.au
stealstopper.com
sharks.org.au
lilydaleairport.com.au


aliases for the virtual domain get hidden in virtusertable :

rollcage2# more virtusertable
coach at aboc.com.au       carl at aboc.com.au
aboc at aboc.com.au        aboc at rollcage2.bl.echidna.id.au
test at aboc.com.au        test at rollcage2.bl.echidna.id.au
owner-aboc at bl.echidna.id.au     carl at aboc.com.au
aboc-archive at aboc.com.au        aboc-archive at rollcage2.bl.echidna.id.au
rich at bl.echidna.id.au           rjgrace at fastmail.fm
admin at bl.echidna.id.au          carl at bl.echidna.id.au
carl at stealstopper.com           carl at bl.echidna.id.au
@sharks.org.au                  @bl.echidna.id.au
info at lilydaleairport.com.au     info_lilydaleairport

The <>@rollcage2.bl.echidna.id.au is how I've got around virtusertable
being a 1:1 mapping, I hide the expanding aliases in /etc/mail/aliases
for the local server (rollcage2), which then expands them, as normal
local aliases.  It's messy, but virtusertables can't do 1:many mappings,



mailertable looks like this :

bl.echidna.id.au        cyrusv2d:/var/imap/socket/lmtp
and so on for each domain

FWIW, the virthosts file I found difficult to track down in
any doco.

HTH

Carl






Jesper K. Pedersen wrote:

> I am trying to get a system up and running with Sendmail to run with
> cyrus imap using virtual hosting of several domains.
> 
> I have created my user in the sasldb and a mailbox in the cyrus imap
> database and it tests out okey using imtest -u jesper at k-w-r.dk -a
> jesper at k-w-r.dk localhost
> 
> I am able to send mail through the sendmail daemon to other servers but
> when I try to send to jesper at k-w-r.dk it wont deliver.
> I have narrowed the problem down to sendmail is trying to deliver to the
> user "jesper" instead of "jesper at k-w-r.dk"
> 
> This is verified by running a :
> 
> sendmail -d60.1 -bv jesper at k-w-r.dk
> map_lookup(dequote, root) => NOT FOUND (0)
> map_lookup(host, k-w-r.dk) => k-w-r.dk. (0)
> map_lookup(dequote, jesper) => NOT FOUND (0)
> jesper at k-w-r.dk... deliverable: mailer cyrusv2, user jesper
> 
> Where the cyrus expect the user to be jesper at k-w-r.dk
> 
> My sendmail local-host-names contain the "k-w-r.dk" entry.
> 
> 
> My sendmail.mc looks like this:
> divert(-1)dnl
> include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
> VERSIONID(`SolNet Data Service')dnl
> OSTYPE(`linux')dnl
> define(`confDEF_USER_ID',``8:13'')dnl
> define(`confTO_CONNECT', `1m')dnl
> define(`confTRY_NULL_MX_LIST',true)dnl
> define(`confDONT_PROBE_INTERFACES',true)dnl
> define(`ALIAS_FILE', `/etc/aliases')dnl
> define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
> define(`confPRIVACY_FLAGS',
> `authwarnings,novrfy,noexpn,restrictqrun')dnl define(`confAUTH_OPTIONS',
> `A')dnl define(`confCACERT_PATH', `/etc/mail/certs')dnl
> define(`confCACERT', `/etc/mail/certs/cacert.pem')dnl
> define(`confSERVER_CERT', `/etc/mail/certs/sendmail.pem')dnl
> define(`confSERVER_KEY', `/etc/mail/certs/sendmail.pem')dnl
> define(`confCLIENT_CERT', `/etc/mail/certs/sendmail.pem')dnl
> define(`confCLIENT_KEY', `/etc/mail/certs/sendmail.pem')dnl
> TRUST_AUTH_MECH(`LOGIN PLAIN DIGEST-MD5 CRAM-MD5')dnl
> define(`confAUTH_MECHANISMS', `LOGIN PLAIN DIGEST-MD5 CRAM-MD5')dnl
> define(`confTRUSTED_USER', `cyrus')dnl
> define(`confLOCAL_MAILER', `cyrusv2')dnl
> GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl
> FEATURE(use_cw_file)dnl
> FEATURE(use_ct_file)dnl
> FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
> FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
> FEATURE(`genericstable', `hash -o /etc/mail/genericstable.db')dnl
> FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
> FEATURE(`blacklist_recipients')dnl
> FEATURE(local_lmtp)dnl
> EXPOSED_USER(`root')dnl
> MAILER(local)dnl
> MAILER(cyrusv2)dnl
> MAILER(smtp)dnl
> 
> When I try to mail to the user jesper at k-w-r.dk I get this in my imap
> debuglog:
> Jul 11 04:08:57 rhea lmtpunix[12743]: executed
> Jul 11 04:08:57 rhea lmtpunix[12743]: accepted connection
> Jul 11 04:08:57 rhea lmtpunix[12743]: lmtp connection preauth'd as
> postman Jul 11 04:08:57 rhea lmtpunix[12743]: verify_user(user.jesper)
> failed: Mailbox does not exist
> 
> Any idea of how to set up sendmail so it will send the full name and
> address to cyrus so you can have virtual hosting without having the
> "worry" about usernames?
> so jesper at k-w-r.dk , jesper at someoter.domain ... isnt a problem and where
> you dont have to use the sendmail alias to create new user names for all
> the users?
> 
> This problem have troubled me for several days now so any ideas is
> greatly appreciated.
> 
> Best regards,
> Jesper K. Pedersen
> --
> Carpe Aptenodytes!
> ---
> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list