[Web-cyradm] Strange problem wih sender address rewritting
Robo Kupka
cyradm at kupka.sk
Tue Apr 22 17:06:14 CEST 2008
Hello cyradmins,
I have strange problem.
I´ve been using successfuly web-cyradmin and Postfix+CyrusIMAP+SASL+MySQL
setup since 2003 and have installed it many times on other server, no
problems so far. I dont use any FQDN patches nor DOMAIN_AS_PREFIX.
But now, something strange is happening. Imagine this:
I have this in ACCOUNTUSER table:
username password prefix domain_name
--------------------------------------------------------------
zuzana xxxyyyzzz tom tomtom.sk
zuzana-zep yyyzzzxxx zep zep.sk
and this in VIRTUAL table:
alias dest username status
--------------------------------------------------------------
zuzana at tomtom.sk zuzana zuzana 1
zuzana at zep.sk zuzana-zep zuzana-zep 1
Now note... that I have account with username "zuzana", and I have 2
e-mail addresses, both have "zuzana" before @.
I have followed Luc´s HowTo precisely, mysql-virtual.cf,
mysql-canonical.cf and mysql-destination.cf config files are from HowTo,
so is main.cf and master.cf modifications.
Now how the problem looks on my server:
When zuzana at zep.sk sends e-mail from internet to anybody who has account
on my server, POSTFIX (or cyrus ?) rewrites "sender address" according to
the lookup defined in mysql-canonical.cf to "zuzana at tomtom.sk" !!! Which
is obviously wrong.
Lookup in mysql-canonical.cf is defined as following: table = virtual,
select_field = alias, where_field = username.
Now, why this lookup return address "zuzana at tomtom.sk" ? Because it used
as username "zuzana" extracted from original sender´s e-mail address.
What does this mean? Sender address rewrite should be performed only when
local e-mail is generated via WEBMAIL (squirrelmail), because sender
address from webmail is constructed as username at domain, where domain is my
server´s hostname - mail.xyz.sk (in my case, zuzana-zep at mail.xyz.sk) and
this address must be rewritten to zuzana at zep.sk.
Address reqritting should not be performed when mail arrives from
internet, am I right ?
So, how to prevent this mistakenly performed sender address rewriting ?
My second thought - I must avoid from creating account usernames, that are
same as any left (xxx@) part of e-mail addresses in virtual alias table.
I.e. I should delete account "zuzana" and make it again as "zuzana-tom" in
tomtom.sk domain.
I´m not sure if this was understandable. I also understand that I could
easily avoid of this problem by using "DOMAIN_AS_PREFIX=1" and FQDN setup.
But I cannot do that.
So, what do you think ?
Thanks. Robert
More information about the Web-cyradm
mailing list