> On 20 Dec 2019, at 22:06, Matus UHLAR - fantomas <uh...@fantomas.sk> wrote: > > On 20.12.19 17:25, Gerben Wierda wrote: >> I am trying to understand how my aliases/virtual_users/etc interact. >> >> postfix setup has virtual domains and virtual users, but all users (also >> those from different domains) are local dovecot IMAP mailboxes (“separate >> domains, unix system accounts”) >> >> main.cf says it is the destination for: >> mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, >> $myorigin >> mydomain = rna.nl >> mydomain_fallback = localhost >> myhostname = mail.rna.nl >> mynetworks = 127.0.0.0/8, 192.168.2.0/24, [::1]/128 >> myorigin = dumbledore.rna.nl >> >> Aliases maps are defined in main.cf as follows: >> alias_maps = hash:/Library/Server/Mail/Config/postfix/aliases >> hash:/Library/Server/Mail/Data/listserver/aliases/list_server_aliases >> virtual_alias_maps = $virtual_maps >> hash:/Library/Server/Mail/Config/postfix/virtual_users >> hash:/Library/Server/Mail/Config/postfix/rna_virtual_users >> hash:/Library/Server/Mail/Data/listserver/aliases/list_server_virtual > > don't you have dumbledore.rna.nl defined in > /Library/Server/Mail/Config/postfix/virtual_users > /Library/Server/Mail/Config/postfix/rna_virtual_users or > /Library/Server/Mail/Data/listserver/aliases/list_server_virtual by any > chance?
No. The only occurrences of the string ‘dumbledore' in /Library/Server/Mail/Config/: main.cf:myorigin = dumbledore.rna.nl rna_virtual_users:r...@dumbledore.rna.nl r...@rna.nl and none in /Library/Server/Mail/Data/listserver/aliases/list_server_virtual > > >> My /Library/Server/Mail/Config/postfix/aliases file contains: >> # Person who should get root's mail. Don't receive mail as root! >> root: gerben >> # Basic system aliases -- these MUST be present >> MAILER-DAEMON: postmaster >> postmaster: root >> postfix: root >> >> gerben is an existing local user with a dovecot IMAP mailbox who can receive >> mail. >> >> The result of trying to mail to r...@rna.nl or r...@dumbledore.rna.nl using >> SMTP from another system was originally: >> The server response was: <r...@dumbledore.rna.nl>: Recipient address >> rejected: User unknown in local recipient table >> >> The server’s name internally is dumbledore.rna.nl (presents itself as >> mail.rna.nl on the outside) and the same happened with the r...@rna.nl >> address or with ger...@dumbledore.rna.nl, but ger...@rna.nl worked. And >> postmas...@rna.nl worked and delivered to gerben’s dovecot mailbox. >> >> Why doesn’t this work? E.g. the server is the final destination for >> $myorigin which is dumbledore.rna.nl, but ger...@dumbledore.rna.nl doesn’t >> work. >> >> With the following in virtual_users: >> r...@rna.nl r...@rna.nl >> I can receive mail for root from another system via SMTP to r...@rna.nl, but >> I still cannot receive local mail to root from the local /usr/bin/mail or >> crontab to ‘root'. It seems that I must have a ~root/.forward with in it: >> ger...@rna.nl >> or I have to put the following in another /etc/aliases file (not the one >> postfix uses): >> root: ger...@rna.nl >> And not ‘gerben’ as otherwise, the mail ends up in /var/mail/gerben instead >> of in dovecot >> >> And I must enter the r...@dumbledore.rna.nl in my virtual_users as well: >> r...@rna.nl r...@rna.nl >> r...@dumbledore.rna.nl r...@rna.nl >> to have it covered, >> >> I have it working but it seems all a little complex to me and I get the >> feeling that I have made things overly complex. Am I correct? >> >> And what is preferred? An /etc/aliases file that is in use (next to the one >> I am using) or a ~root/.forward file? > > alias_maps are processed before .forward, virtual_alias_maps before > alias_maps. > > -- > Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ > Warning: I wish NOT to receive e-mail advertising to this address. > Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. > It's now safe to throw off your computer.