Link to home
Start Free TrialLog in
Avatar of phil3_curtis
phil3_curtis

asked on

send mail to more than one user

Dear Experts,

what would be the best way to POP mail off a remote server, and forward it to a list of local users?
Any suggestions are welcome.

Thanks Phil.
Avatar of owensleftfoot
owensleftfoot

Are you talking sending or collecting? If its collecting fetchmail is what you are looking for. For sending you need a different approach. Sending mail to a single user who has a .forward file in his home directory containing all the users you want to receive the mail would be an easy way.
Avatar of phil3_curtis

ASKER

Fetching.

I already use this ( I run fetchmail as a daemon)

rc.local

/usr/bin/fetchmail -v -f /etc/fetchmailrc -L /var/log/fetchmail.log

/etc/fetchmailrc

set daemon 600
poll somemailhost no dns
     proto pop3
     user "abc" with pass "secret" is def here keep
     user "abc" with pass "secret" is ghi here nokeep

This seems to work, but I am sure there must be a more elegant way. I don't like the idea of creating "extra users", but it is an idea.........
I pick up email with fetchmail for a company of 30 users - only one remote mail box, 30 local users.
Great. How?
You already have the idea -

You have one remote mailbox. Fetchmail picks up the mail, examines the recipient address and delivers it to your mta - sendmail eg. Sendmail delivers the mail locally. Have a look at man fetchmail - especially the localdomains command.
OK. I don't need domain mail. Basically I need to fetch emails from a remote POP3 account and send a copy of all mails there to all local users on the Linux server.

     user "abc" with pass "secret" is def here keep
     user "abc" with pass "secret" is ghi here nokeep

what i do here is read the same POP3 account and send it to the local users. When the last user has the mail I delete the mail from the POP3 server. The problem (potential) is that by using this method I will fetch the same mail x times thus generating unnecessary traffic. Once the mail has been fetched it should be possible to distribute it to a list of users.
One other idea that I thought of would be to install postfix and pipe all the recieved mail to postfix, and distribute it using aliases, but this seems like too much work (i'm lazy :-))
ASKER CERTIFIED SOLUTION
Avatar of owensleftfoot
owensleftfoot

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'll give it a try.