LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-13-2016, 04:00 PM   #1
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
postfix with procmail


I'm trying to set up an e-mail server, but after installing procmail, I can't get it to work.
This is what I get when I try to send an e-mail within the domain:
Quote:
Jun 13 23:22:43 macroscian postfix/qmgr[21196]: D39BE70F8ED3E: from=<user@mydomain.com>, size=431, nrcpt=1 (queue active)
Jun 13 23:22:59 macroscian procmail[21207]: Couldn't rename bogus "/var/spool/mail/vinci" into "/var/spool/mail/BOGUS.vinci.2o"
Jun 13 23:23:00 macroscian postfix/local[21206]: D39BE70F8ED3E: to=<vinci@macroscian.com>, relay=local, delay=16, delays=0.18/0.04/0/16, dsn=5.2.0, status=bounced (can't create user output file. Command output: procmail: Renaming bogus mailbox "/var/spool/mail/vinci" info "/var/spool/mail/BOGUS.vinci.2o" procmail: Couldn't create "/var/spool/mail/vinci" )
Jun 13 23:23:00 macroscian postfix/cleanup[21204]: 0909370F8ED3F: message-id=<20160613202300.0909370F8ED3F@macroscian.com>
Jun 13 23:23:00 macroscian postfix/bounce[21243]: D39BE70F8ED3E: sender non-delivery notification: 0909370F8ED3F
Jun 13 23:23:00 macroscian postfix/qmgr[21196]: 0909370F8ED3F: from=<>, size=2477, nrcpt=1 (queue active)
Jun 13 23:23:00 macroscian postfix/qmgr[21196]: D39BE70F8ED3E: removed
Jun 13 23:23:00 macroscian postfix/local[21206]: 0909370F8ED3F: to=<quas@macroscian.com>, relay=local, delay=0.01, delays=0/0/0/0.01, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION")
Jun 13 23:23:00 macroscian postfix/qmgr[21196]: 0909370F8ED3F: removed
This is the output of postconf -n:
Quote:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
disable_vrfy_command = yes
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailbox_command = /usr/bin/procmail -a "$EXTENSION" "DEFAULT=$HOME/Maildir/" "MAILDIR=$HOME/Maildir/"
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = mail.mydomain.com, localhost, mydomain.com
mynetworks = my_network/24
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_security_level = may
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = reject_non_fqdn_sender, reject_unknown_sender_domain
smtpd_tls_CAfile = /etc/postfix/tls/fullchain.pem
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/postfix/tls/cert.pem
smtpd_tls_key_file = /etc/postfix/tls/privkey.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
unknown_local_recipient_reject_code = 550
under /etc/aliases I also have:
Quote:
root: vinci
Not 100% certain about this one, but in a tutorial I'm reading it says that procmail works only if all root e-mail is redirect to a real user.
 
Old 06-13-2016, 09:16 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,272
Blog Entries: 28

Rep: Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123
The best tutorial I've found on procmail is this one: http://userpages.umbc.edu/~ian/procmail.html

It's old, but it's well-written and clearly explained and, based on my personal experience, works for my personal use of Mutt for email.

Could you post the beginning of your .procmailrc file, the part up to when the procmail recipes start?

Did you also install formmail? I'm hardly a Linux postmaster, but I know that, in my .procmailrc file, I have to tell it where to find formmail, but I don't know enough to explain how they work together.

Last edited by frankbell; 06-13-2016 at 09:17 PM.
 
Old 06-14-2016, 04:06 AM   #3
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Original Poster
Rep: Reputation: 103Reputation: 103
I've never heard of formmail, but that's quite irrelevant, given this is the first time I've configured an e-mail server. In the tutorial I'm reading, which is quite comprehensive, it says nothing of formmail. I'm using SpamAssassin which I gather does the same thing? What I'm trying to say is that I'm not really sure that procmail is dependent on formmail
 
Old 06-14-2016, 01:35 PM   #4
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Original Poster
Rep: Reputation: 103Reputation: 103
For some reason, it started working. I've no idea why. It might be that I have forgotten to restart the services. This could have been one of the problems. So there's no need for formmail. At least this is what I'm inferring now.

Thanks for the answer, anyway.
 
Old 06-14-2016, 10:56 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,272
Blog Entries: 28

Rep: Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123Reputation: 6123
Glad it's working and sorry I missed the mark. It was sort of shot in the dark any way.

Could you post a link to the tutorial you were following? Others might find it interesting. I know I would.

Frankly, I'm not that clear on the relationship between formail and procmail, as it's been a while since I first set up Mutt. From what I remember, procmail said where the mail should go and formmail put it there in the correct format. It's not really analogous to Spam Assassin, as it doesn't assassinate anything. But, as I said, I'm hardly a Linux postmaster.

Formail's man page says

Quote:
formail is a filter that can be used to force mail into mailbox format, perform `From' escaping, generate auto-replying headers, do simple header munging/extracting or split up a mailbox/digest/articles file. The mail/mail-box/article contents will be expected on stdin.
Based on that, formail seems to be more about format than anything else, and, thanks to you, I've learned something new tonight!

Last edited by frankbell; 06-14-2016 at 10:58 PM.
 
Old 06-15-2016, 01:10 AM   #6
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Original Poster
Rep: Reputation: 103Reputation: 103
Well, it's more of a book than a tutorial, actually.
It's called Pro Linux System Administrator, by James Turnball, Peter Lieverdink and Dennis Matotek. (apress). It's 2009, and I'm implementing it for Centos 7, which means that I have to adapt a few things, but it's not all that bad.
 
  


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
procmail Autoresponder for Postfix javed_dogar Linux - Server 8 09-25-2008 11:44 PM
Need help POSTFIX,PROCMAIL tkmuthuvel Linux - General 9 04-18-2006 11:31 PM
postfix - procmail, fetchmail varun_saa Mandriva 3 09-11-2005 12:53 AM
Using Procmail with Postfix jomy Linux - Networking 1 06-05-2005 09:38 AM
postfix, procmail, cyrus jonin Linux - Software 0 10-15-2004 02:09 PM

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

All times are GMT -5. The time now is 03:33 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