| Author |
Message |
sblantipodi
Joined: 13 May 2009
Posts: 450
Location: Italy
|
| Posted: Fri Oct 21, 2011 7:08 am Post subject: copy inbox and outbox to an external email address. |
|
|
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. |
|
| Back to top |
|
Piki
Joined: 16 Jun 2011
Posts: 276
Location: Cyberspace
|
| Posted: Fri Oct 21, 2011 9:59 am Post subject: |
|
|
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. |
|
| Back to top |
|
sblantipodi
Joined: 13 May 2009
Posts: 450
Location: Italy
|
| Posted: Fri Oct 21, 2011 10:05 am Post subject: |
|
|
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? |
|
| Back to top |
|
sblantipodi
Joined: 13 May 2009
Posts: 450
Location: Italy
|
| Posted: Fri Oct 21, 2011 10:44 am Post subject: |
|
|
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. |
|
| Back to top |
|
sblantipodi
Joined: 13 May 2009
Posts: 450
Location: Italy
|
| Posted: Fri Oct 21, 2011 10:59 am Post subject: |
|
|
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? |
|
| Back to top |
|
sblantipodi
Joined: 13 May 2009
Posts: 450
Location: Italy
|
| Posted: Fri Oct 21, 2011 11:51 am Post subject: |
|
|
sender_bcc_maps = hash:/etc/postfix/bcc_maps
recipient_bcc_maps = hash:/etc/postfix/bcc_maps
was the answer.
thanks anyway. |
|
| Back to top |
|
| |