Emails from 'real' users (like [email protected]) to 'aliases' (like [email protected]) works fine from outside and locally. I fixed it by setting different machine name from domain[1-3].tld in /etc/myname. Before that I have received "5.2.4 error" for aliased (virtuals) users like for 'real' users now.
All the smtpd-pgsql.conf queries have no changes after migration OpenSMTPd 6.0 -> 6.4. I've just tested smtpd with /etc/mail/virtuals flat file instead of PGSQL query, but the same "5.2.4 error" is still present. cat /etc/mail/smtpd.conf ... table virtuals file:/etc/mail/virtuals ... ------------------------------- cat /etc/mail/virtuals # Virtual addresses for external mail [email protected] [email protected] [email protected] vmail # Mailing list addresses [email protected] "|/usr/local/bin/mlmmj-receive -L /var/spool/mlmmj/broadcast/" # Misc addresses [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] ------------------------------- Aliases works as from flat file and from aliases.db smoothly after fixing /etc/myname: cat /etc/mail/aliases # $OpenBSD: aliases,v 1.66 2018/07/23 14:15:14 florian Exp $ # '/usr/bin/newaliases' must be run after this file is updated to show it to smtpd # Basic system aliases - must be present MAILER-DAEMON: postmaster postmaster: root ### Pseudo accounts redirections daemon: root ftp-bugs: root operator: root uucp: root www: root ### System default aliases root: user support: user user: [email protected] # mlmmj list members broadcast: "|/usr/local/bin/mlmmj-receive -L /var/spool/mlmmj/broadcast/" ### Pseudo accounts shouldn't receive mail _dhcp: /dev/null ... ### RFC2142: network operations mailbox names #abuse: root #noc: root #security: root ### RFC2142: support mailbox names for specific Internet services #hostmaster: root #usenet: root #news: usenet #webmaster: root #ftp: root ----------------------------------- OpenBSD 6.3amd64 is used. Please advice. On 9/7/2018 10:34 PM, Matt Schwartz wrote: > Can you share your smtpd.conf and virtual users table? Please also let > me know if you use a userbase table and share it as well. Also, are the > forwards going through a .forward file? > > On Sep 7, 2018 2:44 PM, "Denis" <[email protected] > <mailto:[email protected]>> wrote: > > Since /etc/myname changed to a different one from virtual domain name > used in OpenSMTPd mlmmj mailing lists work well, aliases work as it > should be too. > > But I can't send mail to a users with 'real' mailboxes in the same > domain served by OpenSMTPd where aliased users present also. > > For instance: > [email protected] can send to [email protected] alias2@ alias3@ > but > [email protected] can't send to [email protected] user3@ user4@ and other > users with 'real' mailboxes in the same domain. > > 'An error occurred while sending mail. The mail server responded: > ,5.2.4 Mailing list expansion problem., Please check the message > recipient "[email protected]" and try again' > > #tail -n 20 /var/log/maillog > smtpd[6323] smtp failed-command address=12.34.56.78 host=12.34.56.78 > command="RCPT TO:<[email protected]>" result="524 52.4 Mailing list > expansion problem" > smtpd[6323] smtp failed-command address=12.34.56.78 host=12.34.56.78 > command="RCPT TO:<[email protected]>" result="524 52.4 Mailing list > expansion problem" > .. > > Outgoing mail sends well. Incoming mail receives well too. > > opensmtpd works with dovecot imap together. > > Any advises will be highly appreciated. > > On 8/19/2018 12:57 PM, Denis wrote: > > Solved. The problem was with /etc/myname which has the same name > as one > > of virtual domains used for smtpd. > > > > On 8/19/2018 12:56 AM, Denis wrote: > >> Hi there, > >> > >> After "upgrade" OpenSMTPd to 6.4.0 (smtpd.conf syntax has been > >> corrected) from OpenBSD -current having trouble with aliased > addresses. > >> > >> If I tried to send mail to alias address I receive error from > mail program: > >> > >> 'An error occurred while sending mail. The mail server responded: > >> ,5.2.4 Mailing list expansion problem., Please check the message > >> recipient "[email protected]" and try again' > >> > >> mlmmj does not send emails also by OSMTPd 6.4.0. I have only one list > >> named 'all' for broadcast messages. So if I sent to [email protected] I > >> receive nothing. > >> > >> Previously, OpenSMTPD 6.0 from OpenBSD 6.3 sources look for 'aliases' > >> from 'aliases.db' and 'virtuals' from PostgreSQL database. All works > >> smoothly as it should be. > >> > >> To exclude possible PGSQL issues for 'virtuals' I've added to > smtpd.conf > >> lookup for 'virtuals' from plain text file: > >> > >> ... > >> table aliases db:/etc/mail/aliases.db > >> table virtuals file:/etc/mail/virtuals > >> # table virtuals postgres:/etc/mail/smtpd-pgsql.conf > >> ... > >> > >> In all cases (when 'table virtuals file:/..' or 'table virtuals > >> postgres:/..' or using mlmmj, or mail to aliased address) I have the > >> same debug messages by running smtpd 6.4.0 in table debug mode: > >> > >> # smtpd -dv -T virtuals -T lookup > >> > >> ... > >> 77205978ce2bed68 smtp connected address=local host=domain.tld > >> lookup: check "local" as NETADDR in table static:<localhost> -> found > >> lookup: check "domain.tld" as DOMAIN in table static:<localnames> > -> found > >> lookup: lookup "support" as ALIAS in table db:aliases -> "myaddr" > >> debug: aliases_get: returned 1 aliases > >> lookup: lookup "myaddr" as ALIAS in table db:aliases -> > "[email protected]" > >> debug: aliases_get: returned 1 aliases > >> lookup: check "local" as NETADDR in table static:<localhost> -> found > >> lookup: check "domain.tld" as DOMAIN in table static:<localnames> > -> found > >> lookup: lookup "myaddr" as ALIAS in table db:aliases -> > "[email protected]" > >> debug: aliases_get: returned 1 aliases > >> lookup: check "local" as NETADDR in table static:<localhost> -> found > >> lookup: check "domain.tld" as DOMAIN in table static:<localnames> > -> found > >> lookup: lookup "myaddr" as ALIAS in table db:aliases -> > "[email protected]" > >> debug: aliases_get: returned 1 aliases > >> lookup: check "local" as NETADDR in table static:<localhost> -> found > >> lookup: check "domain.tld" as DOMAIN in table static:<localnames> > -> found > >> lookup: lookup "myaddr" as ALIAS in table db:aliases -> > "[email protected]" > >> debug: aliases_get: returned 1 aliases > >> lookup: check "local" as NETADDR in table static:<localhost> -> found > >> lookup: check "domain.tld" as DOMAIN in table static:<localnames> > -> found > >> 77205978ce2bed68 smtp failed-command address=local host=domaintld > >> command="RCPT TO:<[email protected]> " result="524 5.2.4 Mailing > list > >> expansion problem" > >> debug: control -> client: pipe closed > >> debug: clearing p=client, fd=11, pid=0 > >> 77205978ce2bed68 smtp disconnected address=local host=domain.tld > >> reason=disconnect > >> ... > >> > >> What can be wrong? > >> > >> Denis > >> > >> > >> > >> > >> > > > > -- > You received this mail because you are subscribed to > [email protected] <mailto:[email protected]> > To unsubscribe, send a mail to: [email protected] > <mailto:misc%[email protected]> > > -- You received this mail because you are subscribed to [email protected] To unsubscribe, send a mail to: [email protected]
