Solved

send mail to more than one user

Posted on 2004-04-16
10
229 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

737 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