LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-09-2008, 03:31 PM   #1
Rush_898
Member
 
Registered: Mar 2004
Distribution: debian...
Posts: 31

Rep: Reputation: 16
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/
 
Old 12-09-2008, 04:56 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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.
 
Old 12-10-2008, 09:56 AM   #3
Rush_898
Member
 
Registered: Mar 2004
Distribution: debian...
Posts: 31

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by bathory View Post
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.
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?
 
Old 12-10-2008, 02:39 PM   #4
Rush_898
Member
 
Registered: Mar 2004
Distribution: debian...
Posts: 31

Original Poster
Rep: Reputation: 16
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')
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
disable outbound sendmail for specific To recipients walidaly Linux - Software 1 12-16-2007 10:36 PM
Specify Sendmail Outbound IP for E-mail Header lstanderfer Linux - Enterprise 1 11-05-2007 01:12 PM
sendmail outbound relaying based on senders address dbnor Linux - Networking 2 01-27-2007 09:44 AM
Sendmail works.. outbound only :( ziggy25 Linux - Networking 2 12-20-2005 05:56 PM
Capture email from maillist.... costasm Linux - Software 4 12-09-2003 03:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration