Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

Change Postfix System Email

We're running a Postfix server configured to operate solely as an outgoing SMTP server. It does not have any local mailboxes setup.
We're having an issue when a message goes through the server and can't be delivered it attempts to bounce back to the sender. If it can't bounce back to the sender it then ends up being delivered to root@smtp.domain.net. Since the root user is considered local the messages seem to pile up for a few days on the server until its eventually removed from the queue.
I'd like to change this so that it will send these undeliverable messages to myself: admin@domain.net. My mailbox is on a seperate system however.
How can I get the Postfix server to deliver these messages to another mailbox?
0
wookaka
Asked:
wookaka
  • 3
  • 3
1 Solution
 
Gabriel OrozcoSolution ArchitectCommented:
create a .forward file on /root/ with only your email address inside. it would be used by postfix to forward all emails going to root, to the address you want.
0
 
wookakaAuthor Commented:
That didn't work.
The messages stay in the Postfix queue and don't get to the root mailbox.

I've also tried setting the 2bounce_notice_recipient but that isn't delivering to my remote email address either.
0
 
Gabriel OrozcoSolution ArchitectCommented:
Are you using Maildir format? in sauch case you need to create the maildir folder with the tool provided by postfix
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
wookakaAuthor Commented:
I'm not sure what you mean by "Maildir format".

I have been starting to get bounce messages delivered to me but I'm not sure if it was the .forward file that did it or the 2bounce_notice_recipient
I'll change the .forward to another address to see if I can tell.
0
 
wookakaAuthor Commented:
I changed the .forward file to another email address but they aren't going there.
It seems like the 2bounce_notice_recipient setting is what did it. The messages come in batches when Postfix processes the defered queue periodically.
0
 
Gabriel OrozcoSolution ArchitectCommented:
right.
if you changed the bounce recipient then messages should not go that far as to reach the root directory and then will not use the .forward file.

that solution is for when the recipient continues to be root  =)

good to see you have solved your problem
0
 
GranModCommented:
PAQed with points refunded (250)

GranMod
Community Support Moderator
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now