On 26 April 2012 06:45, Mark Martinec <[email protected]> wrote: > 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 >> [email protected] does not exist. Only >> [email protected] 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.
EBCAK. I'd already edited this file to and mistyped mydomain :) chomp($mydomain = `hostname -d`); Thanks Mark
