Thanks for all the ideas! I wanted to address the 'root' of the problem (so sorry!) so rather than adjusting the parameters of the mail senders, I ended up creating a '/etc/postfix/myrecipientmap' file and populated it with the following: @subdomain.domain.com @domain.com
Then I added a line in main.cf pointing to this file: recipient_canonical_maps = hash:/etc/postfix/myrecipientmap And issued a 'postmap /etc/postfix/myrecipientmap' command to pick it up. Might have done postfix reload or systemctl restart postfix a couple times to try to resolve the following. Messages are now being sent correctly; however, I still have a handful of messages in the queue which are trying to send to r...@subdomain.domain.com. I tried flushing/reprocessing them with 'postqueue -f' but they're still stuck: B018F813A81 2359 Wed Jul 7 14:44:08 MAILER-DAEMON (delivery temporarily suspended: connect to sub.domain.com[[primary_DNS]]:25: Connection timed out) m...@sub.domain.com 3116A8053E2 533 Tue Jul 6 12:58:13 m...@sub.domain.com (delivery temporarily suspended: connect to sub.domain.com[[primary_DNS]]:25: Connection timed out) r...@sub.domain.com 38BEC80AA6F 2382 Tue Jul 6 13:07:15 MAILER-DAEMON (delivery temporarily suspended: connect to sub.domain.com[[primary_DNS]]:25: Connection timed out) m...@sub.domain.com D18B980AA71 2378 Tue Jul 6 13:05:34 MAILER-DAEMON (delivery temporarily suspended: connect to sub.domain.com[[primary_DNS]]:25: Connection timed out) r...@sub.domain.com 4D6878069D4 17640 Mon Jul 5 04:21:45 MAILER-DAEMON (delivery temporarily suspended: connect to sub.domain.com[[primary_DNS]]:25: Connection timed out) r...@sub.domain.com CB904807977 14776 Sun Jul 4 03:46:41 MAILER-DAEMON (delivery temporarily suspended: connect to sub.domain.com[[primary_DNS]]:25: Connection timed out) r...@sub.domain.com C9D1E8069C4 11110 Sat Jul 3 03:31:40 MAILER-DAEMON (delivery temporarily suspended: connect to sub.domain.com[[primary_DNS]]:25: Connection timed out) r...@sub.domain.com -- 147 Kbytes in 16 Requests. ________________________________ From: owner-postfix-us...@postfix.org <owner-postfix-us...@postfix.org> on behalf of Bernardo Reino <rei...@bbmk.org> Sent: Wednesday, July 7, 2021 11:43 AM To: postfix-users@postfix.org <postfix-users@postfix.org> Subject: Re: logwatch sending to r...@subdomain.domain.com On Wed, 7 Jul 2021, Mike Hughes wrote: > I just noticed that we have a bunch of undeliverable messages piling up in the > queue. I have root defined in aliases for another address, which works when > sending to r...@domain.com. However, since the FQDN in main.cf is defined as > host.subdomain.domain.com it's appending the whole string. > > What's the most stable way to encourage everything to go to r...@domain.com > instead? Thanks! You could explicitly set the destination e-mail (use "--mailto user@domain"). Otherwise logwatch will use whatever is in $MAILTO if defined (you can define it in your crontab if you run logwatch from cron). As a last resort, logwatch will send to "root", which is probably what happens in your case, and any subsequent modification requires Postfix. But I'd recommend just using logwatch's "--mailto" option. Cheers, Bernardo