Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Can anyone explain how I can place a filter or block list of email accounts I do not wish to be able to communicate with my email server? For example, I do not want anyone to be able to send and or receive email from *@aol.com using my MTA. Is there a way in Postfix I can block all SMTP traffic (in/out) to any or all AOL email accounts?
For inbound email, add a check_sender_access to your smtpd_recipient_restrictions to create a blacklists for senders from domains or addresses you wish to block:
# WARNING - DO NOT PUT OKs IN HERE!! Creates Open Relay
aol\.com REJECT We don't allow mail from AOL
.aol\.com REJECT We don't allow mail from AOL
Chose the map type and syntax that suits you (hash, regexp, pcre, etc.)
For outbound email, you can create an AOL-specific transport that sends to error:
transport_maps = hash:/etc/postfix/transport
aol.com error:We do not allow sending to AOL
Now my question is when I create the file /etc/postfix/sender_checks, what do I need to do to make this a hash file? I don't think I need to postmap it, correct? I am still confused about the different types of files.
Postmap translates ASCII text files into a database format. This is required for hash, db, and dbm files, and any other file which is a "database" format. If you specify the files as regexp or pcre, you don't need to postmap, because the files are not database files, but are read directly.
If you are unsure of a table type, do a man on the table type, as in:
OK - Thanks for clearing that up for me. I was not sure when to use Postmap and when it is not needed...
So if I have a file called foo and foo.db and in my main.cf it is being called as regexp or pcre - then I don't need foo.db, correct? Is there a benefit to using one of the mentioned above? Seems like regexp would be preferred so you don't have to postmap anything when you make a change, right?
Right, with pcre/regexp, you just use the text file - no .db file required or used.
The choice of file types you use depends on what you are trying to do, and concerns about performance. Pcre is faster than regexp, so use pcre if you have pcre built in. Use hash's for longer lists, since db lookups are faster than long pcre or regexp lists. If you only have a few entires, the table choice doesn't matter much. Pick one that suits your needs.