Hi there,
First off: completely new to Virtualmin and like it so far!
My latest impression: great seeing SNI support in postfix making it into virtualmin, thanks!
Problem:
Migrating from plesk 17 (using single domain exports from plesk) doesn’t allow for correct email reception, while sending works.
Reason:
/etc/postfix/virtual contains BOUNCE entries for every imported mail account.
Fix:
Change “Primary email address enabled?” from “No” to “Yes” for each imported mail account.
Info:
I’m using “user@domain” style logins and have “Create extra Unix user on Postfix systems when using user@domain format?” set to “Yes” in Virtualmin Configuration -> Advanced Options.
Question:
Is this related to my plesk export or a bug in the virtualmin migration process? Since I’m only getting acquainted with Virtualminm there may also be a setting that I’ve overlooked, allowing to toggle primary email address activation upon migration? I’d like to get to the bottom of this before migrating 30+ servers and 160+ mailboxes.
I tried looking into this and found the following code in migration-plesk9.pl:
…
577 if (@{$uinfo->{‘to’}}) {
578 # Only enable mail if there is at least one destination, which
579 # would be his own mailbox or offsite
580 $uinfo->{‘email’} = lc($name)."@".$dom;
581 }
582 else {
583 delete($uinfo->{‘email’});
584 }
…
I guess this should take care of enabling the primary address? The earlier
…
529 if ($mailuser->{‘mailbox’}->{‘enabled’} eq ‘true’) {
530 # Add delivery to user’s mailbox
531 local $escuser = $uinfo->{‘user’};
…
should trigger since the XML has mailbox->enabled->true.
E.g.:
<mailuser user-guid="60bd7dce-63c8-1e78-3876-16b9b2885d07" name="ib" mailbox-quota="-1" cp-access-default="true" id="63" guid="f4136b76-7523-4a35-814f-cc83dd940193_mn_63" owner-guid="f4136b76-7523-4a35-814f-cc83dd940193" forwarding-enabled="false">
<properties>
<password type="plain">****</password>
</properties>
<preferences>
<mailbox type="mdir" enabled="true">
<content>
<cid unpacksize="0" referrer="true" path="" type="mailbox" offset="ib/Maildir">
<content-file size="15114240">backup_domainmail_2006271151.tar</content-file>
</cid>
</content>
</mailbox>
<alias>butler</alias>
<alias>edu</alias>
<alias>ibres</alias>
<alias>sales</alias>
<alias>support</alias>
<autoresponders>
<content>
<cid unpacksize="0" referrer="true" path="" type="attaches" offset="ib/@attachments">
<content-file size="15114240">backup_domainmail_2006271151.tar</content-file>
</cid>
</content>
</autoresponders>
<addressbook/>
<spamassassin hits="7" status="on" action="mark" subj-text="***SPAM***">
<content>
<cid unpacksize="0" referrer="true" path="" type="spam-assasin" offset="ib/.spamassassin">
<content-file size="15114240">backup_domainmail_2006271151.tar</content-file>
</cid>
</content>
</spamassassin>
<virusfilter state="in"/>
<descriptions>
<description/>
</descriptions>
</preferences>
</mailuser>
mail.log entries before enabling the primary email address:
Jul 25 15:14:02 k4 postfix/smtpd[14701]: connect from mail-wm1-f45.google.com[209.85.128.45]
Jul 25 15:14:02 k4 postfix/smtpd[14701]: BB85D24407CF: client=mail-wm1-f45.google.com[209.85.128.45]
Jul 25 15:14:02 k4 postfix/cleanup[14513]: BB85D24407CF: message-id=<55406569-2A0A-403D-ABBD-85E5014E5C5C@gmail.com>
Jul 25 15:14:02 k4 postfix/qmgr[25180]: BB85D24407CF: from=<someuser@gmail.com>, size=3000, nrcpt=1 (queue active)
Jul 25 15:14:02 k4 postfix/smtpd[14701]: disconnect from mail-wm1-f45.google.com[209.85.128.45] ehlo=2 starttls=1 mail=1 rcpt=1 bdat=1 quit=1 commands=7
Jul 25 15:14:02 k4 postfix/local[14706]: BB85D24407CF: to=<BOUNCE@k4.someserver.de>, orig_to=<ib@migrateddomain.ch>, relay=local, delay=0.12, delays=0.03/0.01/0/0.08, dsn=5.1.1, status=bounced (unknown user: "bounce")
Jul 25 15:14:02 k4 postfix/cleanup[14513]: D8D342441905: message-id=<20200725131402.D8D342441905@k4.someserver.de>
Jul 25 15:14:02 k4 postfix/bounce[14708]: BB85D24407CF: sender non-delivery notification: D8D342441905
Jul 25 15:14:02 k4 postfix/qmgr[25180]: D8D342441905: from=<>, size=4895, nrcpt=1 (queue active)
Jul 25 15:14:02 k4 postfix/bounce[14708]: BB85D24407CF: postmaster non-delivery notification: E1FB12441906
Jul 25 15:14:02 k4 postfix/qmgr[25180]: BB85D24407CF: removed
Jul 25 15:14:03 k4 postfix/smtp[14514]: D8D342441905: to=<someuser@gmail.com>, relay=gmail-smtp-in.l.google.com[64.233.167.27]:25, delay=0.58, delays=0.04/0/0.2/0.34, dsn=2.0.0, status=sent (250 2.0.0 OK 1595682843 j14si808414wru.381 - gsmtp)
Jul 25 15:14:03 k4 postfix/qmgr[25180]: D8D342441905: removed
In the meantime, is there a way to quickly enable all primary email addresses for a specific domain from the cli?
I’d love some input on this!
Thanks
-c