Solved

send mail to more than one user

Posted on 2004-04-16
10
222 Views
Last Modified: 2013-12-15
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
Comment
Question by:phil3_curtis
  • 4
  • 4
10 Comments
 
LVL 17

Expert Comment

by:owensleftfoot
ID: 10843435
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
 

Author Comment

by:phil3_curtis
ID: 10843599
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
 
LVL 17

Expert Comment

by:owensleftfoot
ID: 10843714
I pick up email with fetchmail for a company of 30 users - only one remote mail box, 30 local users.
0
 

Author Comment

by:phil3_curtis
ID: 10844216
Great. How?
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 17

Expert Comment

by:owensleftfoot
ID: 10846523
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
 

Author Comment

by:phil3_curtis
ID: 10847919
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
 
LVL 17

Accepted Solution

by:
owensleftfoot earned 125 total points
ID: 10850180
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
 

Author Comment

by:phil3_curtis
ID: 10850531
I'll give it a try.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
AWS EC2 Linux 1 32
AWS Advice on using WHM/cPanel 1 58
LINUX, CPANEL & WHM 5 18
linux copy files from usb to folder on system 14 43
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now