RCPT (pip) (<postmaster@!change-mydomain-variable!.example.com>)

Simon Brereton simon.brereton at buongiorno.com
Wed Apr 25 19:05:00 CEST 2012


On 24 April 2012 20:43, Mark Martinec <Mark.Martinec+amavis at ijs.si> wrote:
> Simon,
>
>> I posted this once before, but it doesn't happen often enough for me
>> to remember to login and do something about it.
>>
>> The advice I was given then was that the mydomain variable had not
>> been set.  but he has on line 14 of /etc/amavis/conf.d/50-user, so now
>> I'm confused.
>>
>> Furthermore, if I grep for the pattern grep -inr
>> change-mydomain-variable /etc/amavis/ I get no results.
>>
>> Any ideas?
>> It's not fatal, just annoying.
>
> Which version?

mail:~# dpkg -l | grep amavis
ii  amavisd-new                         1:2.6.4-3
 Interface between MTA and virus scanner/content filters



> In your previous posting you showed:
>
>> (28776-15) p.path BANNED:1 ...
>> (28776-15) local delivery: <message.daemon at eftps.com> -> banned-quarantine, ...
>> (28776-15) smtp resp to RCPT (pip) (<postmaster@!change-mydomain-variable!.example.com>):
>>   501 5.1.3 Bad recipient address syntax
>> (28776-15) Negative SMTP resp. to DATA: 554 5.5.1 Error: no valid recipients
>> (28776-15) (!)SEND via SMTP: <postmaster at mail.myserverdomain.net> ->
>>   <postmaster@!change-mydomain-variable!.example.com>,
>>   ENVID=AM..20111108T161007Z at mail.myserverdomain.net
>>   501 5.1.3 Failed, id=28776-15, from MTA([127.0.0.1]:10025):
>>   501 5.1.3 Bad recipient address syntax
>> (28776-15) (!)FAILED to notify admin: 501 5.1.3 Failed, id=28776-15,
>>   from MTA([127.0.0.1]:10025): 501 5.1.3 Bad recipient address syntax
>
> So in that case it was a banned admin notification, which is
> sent to an address given by a lookup on @banned_admin_maps,
> which defaults to:
>  @banned_admin_maps = (\$banned_admin, \%virus_admin, \$virus_admin);
>
> So it must be one of these settings that is copying a value
> of $mydomain *before* it has been set to a sensible value.
>
> The '!change-mydomain-variable!.example.com' is a default
> (and initial value) of a variable $mydomain.
>
> 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/05-domain_id:3:# $mydomain is used just for
convenience in the config files and it is not
/etc/amavis/conf.d/05-domain_id:7:#chomp($mydomain = `head -n 1 /etc/mailname`);
/etc/amavis/conf.d/05-domain_id:15:# Default local domains to
$mydomain and all subdomains.  Remember to
/etc/amavis/conf.d/05-domain_id:16:# override or redefine this if
$mydomain is changed later in the config
/etc/amavis/conf.d/20-debian_defaults:49:#$X_HEADER_LINE = "by
amavisd-new at $mydomain";  # after-default
/etc/amavis/conf.d/20-debian_defaults:124:$virus_admin =
"postmaster\@$mydomain"; # due to D_DISCARD default
/etc/amavis/conf.d/20-debian_defaults:127:#$X_HEADER_LINE = "amavisd.$mydomain";

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.  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?

Thanks Mark!

Simon


More information about the amavis-users mailing list