• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

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.
0
phil3_curtis
Asked:
phil3_curtis
  • 4
  • 4
1 Solution
 
owensleftfootCommented:
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.
0
 
phil3_curtisAuthor Commented:
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.........
0
 
owensleftfootCommented:
I pick up email with fetchmail for a company of 30 users - only one remote mail box, 30 local users.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
phil3_curtisAuthor Commented:
Great. How?
0
 
owensleftfootCommented:
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.
0
 
phil3_curtisAuthor Commented:
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 :-))
0
 
owensleftfootCommented:
Fetchmail delivers to your local mta - it doesnt matter if its postfix or sendmail etc. The easiest way to do what I think you want :) is to use fetchmail to pick up the mail for one user. For the user you choose to collect the mail, create a file called .forward in that users home directory. In this file put the email addresses or local usernames of the people you want to receive the mail. Fetchmail will download the mail and hand it to your mta (probably sendmail). Sendmail will check the users home directory for a .forward file. If it finds one it will forward the email to every address listed in the .forward file.
0
 
phil3_curtisAuthor Commented:
I'll give it a try.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now