Postfix - If To: address is $x. Change From: adress to $y

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications Postfix - If To: address is $x. Change From: adress to $y
# 1  
Old 07-08-2013
Postfix - If To: address is $x. Change From: adress to $y

Hello, hopefully somebody can give me a clue on how to do this.

Right now I have emails coming from company1-alert@company1.com to distribution@ourcompany.com.

I want to set up something in Postfix so that if the email is going to distribution@ourcompany.com, the From: address is automatically re-written to support@ourcompany.com.

That way the people on distribution@ourcompany.com will see the email coming from support@ourcompany.com instead of company1-alert@company1.com.

Any clue on this or where to start would be helpful! Thanks!!!!
# 2  
Old 07-09-2013
it would be much easier and more convenient to everybody involved if you just reset the sender field when you run your mail command ... see man postfix and man mailx -- look for discussion on -r option ...
Code:
echo "your message here" | mailx -s "your warning" -r sender@some.com  $admingroup@some.com

# 3  
Old 07-10-2013
Thank you but the problem is I don't have control over sending the alerts. They are alerts from another company.

I ended up using sender_canonical_maps to re-write the field.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Cannot change mac address

ubuntu / xubuntu 13.10 and 14.04 (this issue should exist in debian as well) I use wifi to connect to internet. I would like to change the wifi card mac address before connecting. Let's call the original mac address, macA, and the new mac address, macB. I do the following: ifconfig wlan0... (2 Replies)
Discussion started by: arpagon
2 Replies

2. UNIX for Dummies Questions & Answers

How can i change the ip address in RHEL 6?

I need to change the ip address in RHEL 6 . Please tell me the files to be edited....complete procedure.......... Don't tell the graphical method ........ Explain everything in CLI ........... Thanks in Advance:b: (3 Replies)
Discussion started by: vamshigvk475
3 Replies

3. Solaris

How to change IP adress of mailserver in Solaris?

Hi all, Our IT changes mailserver's IP address and I am trying to change it but with no success. I am running Solaris 10. I changed IP address of mail server in /etc/hosts file, performed make sendmail.cf but server still sends mais using old IP. Can anyone let me know which actions... (12 Replies)
Discussion started by: nypreH
12 Replies

4. UNIX for Dummies Questions & Answers

Please help with Postfix config issue - How to allow remote Exchange server to relay to my postfix

Hi guys One of our clients have a problem with sending email to a certain domain. No matter what we try, the mails just dont get delivered. What I did then, is created a new connector on their Exchange server, pointing all mail sent to their client at "domain1" to relay to our Postfix mail... (0 Replies)
Discussion started by: wbdevilliers
0 Replies

5. UNIX for Advanced & Expert Users

postfix sender address rewriting

Hi, I have a postfix server that relays to an exchange server. All of my unix/linux systems send to this server, the problem is the form the mail is sent with, the sender address is username@hostname.domain.local I need to rewrite every sender address to unix@maildomain.com for... (0 Replies)
Discussion started by: funksen
0 Replies

6. IP Networking

postfix - reinject mail to postfix from hold queue directory

hi all. Am using smtpd_recipient_restrictions & check_recipient_access in postfix. The hash file looks like this: emailaddress1 HOLD emailaddress2 HOLD The aim is to place email from these recipients in the hold directory,check them then reinject them back in postfix on some... (0 Replies)
Discussion started by: coolatt
0 Replies

7. Shell Programming and Scripting

change from address in mailx

Hi, i am sending mails regulary for updation of data. The from addresses dispaly like POP.RECH@skk182.com i want display like oracle@skk182.com can u help me on this. (1 Reply)
Discussion started by: koti_rama
1 Replies

8. IP Networking

How to change IP address

Can anyone tell me how to change the IP address on a unix server, as I have no idea whatsoever. Thanks (2 Replies)
Discussion started by: itservices
2 Replies

9. HP-UX

Change IP Adress

I want change my IP address and hostname in my machine by use the console. Can any one tell me how can I execute that by command ? Thanks & Regards (1 Reply)
Discussion started by: magasem
1 Replies

10. UNIX for Dummies Questions & Answers

How to change the MAC adress in ethernet adapter for SUN

I have installed in the server a quad ethernet adapter, I'm using two interfaces with two different IP networks, both interfaces are connected to a switch, the switch report that is receiving the same MAC address in both ports so must of the times I have connectivity problems. Any idea to change... (1 Reply)
Discussion started by: mono673
1 Replies
Login or Register to Ask a Question