Ist es möglich, in Postfix ein Shell-Kontopostfach neben virtuellen Postfächern zu haben?

Ist es möglich, in Postfix ein Shell-Kontopostfach neben virtuellen Postfächern zu haben?

Ich habe gerade mein erstes virtuelles Postfach in Postfix eingerichtet. Ich frage mich, ob es möglich ist, zwei Postfächer auf demselben Server zu haben, ein virtuelles und eines mit Shell-Konto, innerhalb derselben Domäne?

[email protected] => goes to /home/first/..
[email protected] => goes to /var/spool/mail/virtual/..

Ich muss E-Mails per Datei weiterleiten können .forward, und das ist nur für Shell-Konten und nicht für virtuelle Postfächer möglich. Ich brauche also beide Arten von Postfächern, eines zum Speichern und eines zum Weiterleiten.

Das Problem, das ich habe, ist, dass, wenn ich mydomain.com zur mydestinationListe hinzufüge, keine E-Mail in virtuellen Postfächern gespeichert wird. Und ThunderBird fordert auf:

An error occurred while sending mail. The mail server responded:  5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table. Please check the message recipient [email protected] and try again.

[AKTUALISIEREN]

Folgendes habe ich bisher ohne Erfolg getan:

Mein /etc/postfix/main.cf:

mydestination = localhost
virtual_mailbox_domains = mydomain.com
virtual_alias_maps = hash:/etc/postfix/valias
virtual_mailbox_base = /var/spool/mail/virtual
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000

Mein /etc/postfix/valias:

shell_account shell_account@localhost

Mein /etc/postfix/vmailbox:

[email protected] mydomain.com/virtual/

Und dann habe ich ausgeführt postmap /etc/postfix/valiasund postmap /etc/postfix/vmailboxschließlich postfix reload. Und da ich Courier als IMAP-Server verwende, userdb -showwird Folgendes angezeigt:

virtual

Aber wenn ich versuche, eine E-Mail zu senden an[email geschützt], Thunderbird fordert Sie auf:

An error occurred while sending mail. The mail server responded:  5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table. Please check the message recipient [email protected] and try again.

[AKTUALISIEREN]

Und hier ist meins mail.log:

postfix/smtpd[10098]: connect from localhost[127.0.0.1]
postfix/smtpd[10098]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table; from=<mehran@localhost> to=<[email protected]> proto=ESMTP helo=<[127.0.0.1]>
postfix/smtpd[10098]: disconnect from localhost[127.0.0.1]

Antwort1

Nun, ich weiß nicht, ob das Ihren Bedarf befriedigt oder nicht.

mydestination = local.mydomain.com
virtual_mailbox_domains = mydomain.com

Fügen Sie dann den Alias ​​zu Ihren virtual_alias_maps hinzu

virtual_alias_maps = hash:/etc/postfix/virtual_alias

Inhalt von /etc/postfix/virtual_alias(aktualisiert)

[email protected] second

Die Idee besteht darin, einen Alias ​​von Ihren virtuellen Postfachdomänen zur lokalen Domäne zu generieren, da .forward nur in lokalen Domänen funktioniert.

Verweise:postfix.org

verwandte Informationen