copy inbox and outbox to an external email address.
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.
5 Replies
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.
@Piki:
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?
Suppose that I have two email address on the same VPS.
and
I would like to forward every email from
every email means every received and sent emails.
How can I do that?
Thanks.
@sblantipodi:
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 toemail1@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
How can I do it for sent email?
recipientbccmaps = hash:/etc/postfix/bcc_maps
was the answer.
thanks anyway.