?
Solved

send mail to more than one user

Posted on 2004-04-16
10
Medium Priority
?
238 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:phil3_curtis
ID: 10844216
Great. How?
0
 
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 500 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

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

765 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