Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Oct 21, 2011 8:08 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
Hi all.

I have a CentOS based VPS running postfix.

What is the fastest way to copy all the emails that arrive into the inbox/outbox to an external email address?
For an external email address I mean an email that is not managed from my vps.

I need something that when an email is received or sent from one email address managed from my VPS, will be automatically forwarded to another email address that is not managed from my VPS.

Thanks.


Top
   
 Post subject:
PostPosted: Fri Oct 21, 2011 10:59 am 
Offline
Senior Member
User avatar

Joined: Thu Jun 16, 2011 8:24 am
Posts: 412
Location: Cyberspace
If you use postfix, you can add the address to /etc/aliases and /etc/postfix/virtual. There's a certain format to follow, and you'd need to activate these files using the newaliases and postmap commands, then restart postfix, but that'll auto-forward incoming mail to another address.

Another option is to use IMAP from an email such as Gmail. Gmail will connect to your server's IMAP server and retrieve incoming mail.

Neither of these include mail you're sending. I wouldn't know how to take care of that except to use a cron job to copy your mbox or maildir to another machine.

_________________
Kris the Piki Geeker


Top
   
 Post subject:
PostPosted: Fri Oct 21, 2011 11:05 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
Piki wrote:
If you use postfix, you can add the address to /etc/aliases and /etc/postfix/virtual. There's a certain format to follow, and you'd need to activate these files using the newaliases and postmap commands, then restart postfix, but that'll auto-forward incoming mail to another address.

Another option is to use IMAP from an email such as Gmail. Gmail will connect to your server's IMAP server and retrieve incoming mail.

Neither of these include mail you're sending. I wouldn't know how to take care of that except to use a cron job to copy your mbox or maildir to another machine.


I don't need to forward but I need to receive the email on two email address, the one managed by my VPS and another external email address.
Any idea on how to copy the sent email or forward it to another email address?


Top
   
 Post subject:
PostPosted: Fri Oct 21, 2011 11:44 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
I make the job more easy.

Suppose that I have two email address on the same VPS.
email1@vps.com
and
email2@vps.com

I would like to forward every email from email2@vps.com to email1@vps.com
every email means every received and sent emails.

How can I do that?

Thanks.


Top
   
 Post subject:
PostPosted: Fri Oct 21, 2011 11:59 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
sblantipodi wrote:
I make the job more easy.

Suppose that I have two email address on the same VPS.
email1@vps.com
and
email2@vps.com

I would like to forward every email from email2@vps.com to email1@vps.com
every email means every received and sent emails.

How can I do that?

Thanks.


For the inbox I solved by adding an alias in /ect/aliases like
email2: email2 email1@vps.com

How can I do it for sent email?


Top
   
 Post subject:
PostPosted: Fri Oct 21, 2011 12:51 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
sender_bcc_maps = hash:/etc/postfix/bcc_maps
recipient_bcc_maps = hash:/etc/postfix/bcc_maps

was the answer.

thanks anyway.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group