Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 16th September 2011, 16:12
j.smith1981 j.smith1981 is offline
Join Date: Nov 2008
Posts: 63
Thanks: 0
Thanked 3 Times in 3 Posts
Question Setting postfix to send local mail to /var/spool/mail/* using iRedmail services

I have setup and had working iRedmail since early May.

But is there anyway of getting local users mail to go to the local users mailbox and not a virtual user?

I mean I did try this using mailx using say root, but of course that mail goes to the virtual users not the local users right?

But then when I tried say 'myuser' it came up with this in the log:

Sep 16 13:55:51 server postfix/pickup[25663]: 392773A64C1: uid=504 from=<regular_user>
Sep 16 13:55:51 server postfix/cleanup[25960]: 392773A64C1: message-id=<20110916125551.392773A64C1@mail.mydomain.co.uk >
Sep 16 13:55:51 server postfix/qmgr[2849]: 392773A64C1: from=<regular_user@mail.mydomain.co.uk>, size=342, nrcpt=1 (queue active)
Sep 16 13:55:51 server postfix/local[25974]: 392773A64C1: to=<myuser@mail.mydomain.co.uk>, relay=local, delay=0.24, delays=0.06/0/0/0.17, dsn=2.0.0, status=sent (delivered to command: /usr/libexec/dovecot/deliver)
Sep 16 13:55:51 server postfix/qmgr[2849]: 392773A64C1: removed
Where of course regular_user is the sender and myuser is the recipient, but it's just not delivering the message, looks as though Postfix is dropping it, is there any means of diverting that mail to a local user easily?

I have the following config in '/etc/postfix/main.cf':
#soft_bounce = no
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname
unknown_local_recipient_reject_code = 550
relayhost = smtp.myisp.net #(for mail that is not handled by the server say for hotmail addresses etc as they would bounce them because I work from a dynamic IP address)
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases

#home_mailbox = Mailbox # could it be one of these possibly?
#home_mailbox = Maildir/ # or this even?

#mail_spool_directory = /var/mail
#mail_spool_directory = /var/spool/mail

debug_peer_level = 2

debugger_command =
ddd $daemon_directory/$process_name $process_id & sleep 5

sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix

mailq_path = /usr/bin/mailq.postfix

setgid_group = postdrop

html_directory = no

manpage_directory = /usr/share/man

sample_directory = /usr/share/doc/postfix-2.5.9/samples

readme_directory = /usr/share/doc/postfix-2.5.9/README_FILES
# Enable IPv4, and IPv6 if supported
inet_protocols = ipv4
virtual_alias_domains =
myhostname = mail.mydomain.co.uk
myorigin = mail.mydomain.co.uk
mydomain = localhost
biff = no
mynetworks =
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_reject_unlisted_recipient = yes
smtpd_sender_restrictions = permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated
policy_time_limit = 3600
maximal_queue_lifetime = 1d
bounce_queue_lifetime = 1d
recipient_delimiter = +
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks,permit_sasl_authenticated, check_helo_access pcre:/etc/postfix/helo_access.pcre
queue_run_delay = 300s
minimal_backoff_time = 300s
maximal_backoff_time = 4000s
enable_original_recipient = no
disable_vrfy_command = yes
allow_min_user = no
message_size_limit = 15728640
#message_size_limit = 524288000
virtual_minimum_uid = 500
virtual_uid_maps = static:500
virtual_gid_maps = static:500
virtual_mailbox_base = /var/vmail
transport_maps = proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf, proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf, hash:/etc/postfix/transport
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql/virtual_alias_maps.cf, proxy:mysql:/etc/postfix/mysql/domain_alias_maps.cf, proxy:mysql:/etc/postfix/mysql/catchall_maps.cf, proxy:mysql:/etc/postfix/mysql/domain_alias_catchall_maps.cf
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_domain.cf, proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf
recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_domain.cf, proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_user.cf
relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql/relay_domains.cf
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql/sender_login_maps.cf
smtpd_reject_unlisted_sender = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_authenticated_header = no
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unlisted_recipient, check_policy_service inet:, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, check_policy_service inet:
smtpd_tls_security_level = may
smtpd_enforce_tls = no
smtpd_tls_loglevel = 0
smtpd_tls_key_file = /etc/pki/tls/private/iRedMail.key
smtpd_tls_cert_file = /etc/pki/tls/certs/iRedMail_CA.pem
smtpd_tls_CAfile = /etc/pki/tls/certs/iRedMail_CA.pem
tls_random_source = dev:/dev/urandom
tls_daemon_random_source = dev:/dev/urandom
# Uncomment the following line to enable policyd sender throttle.
#smtpd_end_of_data_restrictions = check_policy_service inet:
mailbox_command = /usr/libexec/dovecot/deliver
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = ./dovecot-auth
content_filter = smtp-amavis:[]:10024
mail_name = mail.mydomain.co.uk
Would uncommenting the lines here work?
#home_mailbox = Mailbox # could it be one of these possibly?
#home_mailbox = Maildir/ # or this even?
Any feedbacks much appreciated in advance of any replies of course!

Last edited by j.smith1981; 16th September 2011 at 16:22.
Reply With Quote
Sponsored Links


Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix problem jagsler Server Operation 41 7th July 2011 15:19
Email being accepted but not delivered punto Installation/Configuration 8 25th May 2011 01:13
ERROR: Connection dropped by IMAP server. [Centos 5.4, courier imap,squirrel, etc] darevil HOWTO-Related Questions 7 9th June 2010 15:49
Mail server using Postfix, Dovecot, Mysql... Postfix virtual maps doesn't work?? tarasbuljba HOWTO-Related Questions 33 28th May 2010 15:33
CentoS doesn't send the emails vaio1 Installation/Configuration 18 5th November 2008 18:51

All times are GMT +2. The time now is 23:15.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.