Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-09-2008, 04:31 PM
|
#1
|
Member
Registered: Mar 2004
Distribution: debian...
Posts: 31
Rep:
|
Outbound Maillist in Sendmail: confusion
So we use sendmail as a relay host to get mail out onto the internet from a location that should not receive mail. Email is only needed for alerts, essentially. All of our servers use this one sendmail server as a smarthost relay. My hope is to get it set up so that if any mail is relayed through this sendmail server to group-list@email.com that is will actually go to the aliased addresses in the include file. :include:/etc/mail/group-list. So far this has not worked. When I try to email group-list@email.com I get a "User unknown" message. From what I am reading this should work with the configuration below. Am I not understanding how sendmail is thinking about this? In my mind I am aliasing all mail to group-list to the list of emails in /etc/mail/group-list, and so they should be the emails that the message actually is delivered too. Any sendmail people that can help me out? Thanks for any help.
These are my additions to /etc/aliases
Quote:
rush_898: rush_898@email.com
group-list: :include:/etc/mail/group-list
group-list-request: rush_898
owner-group-list: rush_898
|
/etc/mail/group-list
This is what I seen in /var/log/maillog when I try to send a message to group-list@email.com using the sendmail server as a smarthost relay from another server
Quote:
Dec 9 15:15:33 HOST sendmail[3903]: mB9LFW2Z003901: to=<group@email.com>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120668, relay=mail.awesome.com. [63.x.x.x], dsn=5.1.1, stat=User unknown
|
This is followed shortly by...
return to sender
I have been working off of a lot of pages trying to get this to work, but one of the main ones is:
http://www.cs.bgu.ac.il/~arik/usail/mail/lists/
|
|
|
12-09-2008, 05:56 PM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,218
|
Quote:
This is what I seen in /var/log/maillog when I try to send a message to group-list@email.com using the sendmail server as a smarthost relay from another server
Quote:
Dec 9 15:15:33 HOST sendmail[3903]: mB9LFW2Z003901: to=<group@email.com>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120668, relay=mail.awesome.com. [63.x.x.x], dsn=5.1.1, stat=User unknown
|
If it's not a typo, then you're trying to send mail to group@email.com and not to group-list@email.com, so the error you get is normal.
|
|
|
12-10-2008, 10:56 AM
|
#3
|
Member
Registered: Mar 2004
Distribution: debian...
Posts: 31
Original Poster
Rep:
|
Quote:
Originally Posted by bathory
|
Garr! I'm sorry, it is a typo. I shot myself in the foot there. I tried again just to make absolutely sure with the group-list@email.com style syntax and it is the same error message.
Quote:
Dec 10 09:41:31 HOST sendmail[7578]: mBAFfVqi007576: to=<group-list@email.com>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120670, relay=mail.awesome.com. [63.x.x.x], dsn=5.1.1, stat=User unknown
Dec 10 09:41:31 HOST sendmail[7578]: mBAFfVqi007576: mBAFfVqi007578: DSN: User unknown
|
My setup looks like this.
[original mail host]->(smart relay)->[sendmail server]->[destination mail server]
I did some traffic sniffing and looking up of DSN messages. I think what is happening is that my sendmail server is attempting to deliver too group-list at the destination domain, and that mail server is responding with a message saying there is no such user and so it fails. What I want to happen is that anything to group-list@awesome.com gets translated on MY server into the email addresses in the alias list. I'm not sure if this is one of the intentions of the alias feature or not. Thank you for your reply, again sorry for the confusion on my typo. Anyone know how I can translate that from address before it leaves my sendmail server?
|
|
|
12-10-2008, 03:39 PM
|
#4
|
Member
Registered: Mar 2004
Distribution: debian...
Posts: 31
Original Poster
Rep:
|
Well, I kind of solved this for myself. I will detail my solution here in case anyone has the same misconceptions as me.
What I was trying:
I wanted to send an email to group-list@email.com and have it aliased as it was relayed off my server. This did not work as my sendmail instance kept trying to deliver to group-list@email.com directly and that user does not exist. No idea why I thought this was a good idea, it has been a long couple of weeks.
What Does Work:
To do an email distribution list in sendmail. First point, send the original email to a "user" on the sendmail server itself. I set up a dummy user using: useradd -M -s /bin/false group-list. Then I set up my /etc/aliases file:
Quote:
email-list-admin: rush_898@email.com
group-list: :include:/etc/mail/group-list
group-list-request: email-list-admin
owner-group-list: email-list-admin
|
The file /etc/mail/group-list is just a list of emails in a verticle column.
such as
#This is an email distrib-list for group-list
bob@email.com
sue@email.com
The cool thing about this is you can put the group-list file wherever you want and make it so people other than root can add names and remove names from their own lists, and you don't need to restart sendmail or remake the aliases db to do it. (remake aliases db by running 'newaliases')
|
|
|
All times are GMT -5. The time now is 07:51 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|