Is that possible to route all mails sent to a mailbox to another server's mailbox

1

I have a Linux server that has local mail service. There are few user accounts on this server. User may send the mail to each other but that only restrict to LAN environment only.

For example, I may

# mail user1

to send mail to user1. User are not able to send mail to public. Some service like hylafax using this local mail service to send notification of fax status.

I don't want to manage and maintain local mail service anymore. I have subscribed a package from ISP to host a public domain of my own. I wish to have my hylafax service to able to send the notification mails to public mail server, is that possible to do it? It is great if all mails that send to local mail server may forward to public mail server. That makes the local mail service serve mail forward only.

Chau Chee Yang

Posted 2011-01-01T02:27:04.210

Reputation: 802

Answers

0

If you already have the user home directories the easiest way to do that is to put a ~/.forward file in the directory with the proper destination.

However, you may be in for more problems. Most ISPs now block outgoing port 25. Hopefully your mail domain provider also provides a mail submission port (587).

Keith

Posted 2011-01-01T02:27:04.210

Reputation: 7 263

I have few hundreds local accounts here. It would be tedious to put a ~/.forward file into each account. Also I don't want to leave a copy of mail in local mail server. – Chau Chee Yang – 2011-01-01T02:46:37.920

When forwarding the mail is not left in the local mailbox. In that case, use your MTA aliases. – Keith – 2011-01-01T02:59:47.417