Hi.

I'm having some trouble to configure qmail (1.03) correctly for the
following situation: I've an account at an ISP for sending and receiving
mail. After establishing a (dial-up) PPP connection, mails are fetched with
fetchmail, and qmail sends outgoing mail via SMTP.

Sending mails requires that the sender specified in the ,From:' lines must
be the same as the sender specified in the envelope. Furthermore, the
receiving SMTP host (at the ISP) tries to verify the sender addresses:

Qmail's running on a maschine called ,yun' that belongs to a local domain
called ,home.de'. I'm the user ,abc' (,[EMAIL PROTECTED]') there. When ,abc'
tries to send a mail to ,[EMAIL PROTECTED]' via the ISP, the mail is not
accepted and I get the error-message ,cannot route to sender'. The sender,
,[EMAIL PROTECTED]', is obviously unknown to the ISPs host, since there I'm
known as ,[EMAIL PROTECTED]'.

Therefore, in /var/qmail/control/defaulthost I specified ,01019freenet',
with a defaultdomain of ,de'. This rewrites the From: lines and the envelope
sender address ,[EMAIL PROTECTED]' to ,[EMAIL PROTECTED]'.

But ,abc' still needs to be replaced by ,hans_wilmer'. I'm doing that by
setting the environment variables as follows:


MAILUSER=hans_wilmer
MAILSUSER=hans_wilmer
MAILSHOST=01019freenet.de
QMAILINJECT=f


It works, but it introduces two problems:


1.) Any local user can pretend to be ,[EMAIL PROTECTED]' by
    setting these variables, and ,[EMAIL PROTECTED]' can pretend to be
    ,[EMAIL PROTECTED]' ...

2.) All local users actually do pretend to be @01019freenet.de --- and that
    especially applies to some daemons and some lokal programs that have
    their own lokal accounts, when these daemons (cron, for example) or
    programs are sending mail.


The first problem is currently just very ugly, since I'm the only (human)
user on my maschine. But is it a good idea to have those variables and to
allow anyone pretending to be someone else?

The second one is even more ugly. To get hold of the mails my
daemons/programs send, I've added 01019freenet.de to control/locals. It
works, but it will effectively prevent me from sending mail to any user
@01019freenet.de, since all mail to these remote users will be delivered
locally --- and bounce for these remote users do not exist locally (except
users like root or postmaster that are accessible through aliases that point
to myselfe;_).

Well, how can I configure qmail to solve these problems? I'm a little bit
confused with the documentation of qmail (manpages and the FAQ). It's spread
across a lot of files, and it's not easy to find out and understand what
this or that file or directory is used for. An overview over all the related
files and programs is not easy to get. Is there some other documentation I
should read? I would be glad if someone could help me.


GH

Reply via email to