RCPT (pip) (<postmaster@!change-mydomain-variable!.example.com>)
Mark Martinec
Mark.Martinec+amavis at ijs.si
Thu Apr 26 12:45:05 CEST 2012
Simon,
> > So, make sure the value of $mydomain is assigned *before* this
> > variable is used in further expressions.
>
> As I said, this is set in /etc/amavis/conf.d/50-user
> mail:~# grep -inr mydomain /etc/amavis/*
> /etc/amavis/conf.d/50-user:14:$mydomain='myserverdomain.net';
> /etc/amavis/conf.d/20-debian_defaults:124:$virus_admin =
> "postmaster\@$mydomain";
Yes, looks like a wrong order.
> I forget why it was necessary to do this.
>
> It seems to me the best solution would be to edit
> /etc/amavis/conf.d/05-domain_id so that it is set earlier.
Probably.
> However, I
> don't like the value produced by chomp($mydomain = `head -n 1
> /etc/mailname`); because that produces mail.myserverdomtain.net and
> that would cause the MTA to bounce the mail because
> postmaster at mail.myservername.net does not exist. Only
> postmaster at myserverdomain.net does. And I don't know enough perl to
> fix that. Could you suggest what I can use?
Just assign a fixed string, i.e. move $mydomain='myserverdomain.net';
to some file that is evaluated before $mydomain is needed by some
later expression in config files.
This is specific to some Linux distribution,
the resolution should be sought there.
Mark
More information about the amavis-users
mailing list