LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-01-2007, 10:56 PM   #1
snjv
LQ Newbie
 
Registered: Apr 2007
Posts: 28

Rep: Reputation: 15
Postfix: SASL & Send mail through scripts frol localhost


Hello,
Is it possible that I restrict sending mail from a mail server to the following? I am using Postfix's latest version.

1. Only the SASL users who are logged in can send mail.

AND

2. A script running on the localhost (mail server) can send mail with any email-id (ie different sender-ids)?

The first is required to stop spoofing and abusing my mail server, while the second for software management.

Thanks in advance,
-S

Last edited by snjv; 06-01-2007 at 11:28 PM.
 
Old 06-02-2007, 11:02 AM   #2
FMC
Member
 
Registered: May 2007
Location: São Paulo
Distribution: Gentoo & Debian
Posts: 97

Rep: Reputation: 15
I think its possible, try something like that on smtpd_recipient_restrictions

Code:
smtpd_recipient_restrictions =
        permit_mynetworks,
        reject_sender_login_mismatch, 
        permit_sasl_authenticated,
        ...
Now you just have to configure mynetworks to something like
Code:
mynetworks_style = host
mynetworks = 127.0.0.0/8
When your local script try to send an e-mail the first rule (permit_mynetworks) will match and the e-mail will be going.
When some user try to send an e-mail, the second rule will check the mail sender to see if it matches with the sasl_authenticated login, if so, the message will be send and so on...

I believe that this configuration works for what you want, but have some tests is always good!

[]'s, FMC!
 
Old 06-02-2007, 11:53 AM   #3
snjv
LQ Newbie
 
Registered: Apr 2007
Posts: 28

Original Poster
Rep: Reputation: 15
Thanks FMC. I shall report back.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Postfix send mail problem(In RH9, kernal 2.4.20, postfix 2.1.5) minor Linux - General 6 09-23-2019 11:09 PM
Postfix - cannot send e-mail abapdr Linux - Software 13 08-13-2013 06:47 AM
postfix relay problems with SASL authentication & TLS climbingmerlin Linux - Software 0 04-05-2006 09:55 AM
Cyrus SASL & Postfix RPM Build ghight SUSE / openSUSE 0 06-03-2005 10:46 AM
Postfix SASL: conflict of sdsldb & system account? Chowroc Linux - Networking 0 12-24-2004 05:56 AM

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

All times are GMT -5. The time now is 02:31 PM.

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