PDA

View Full Version : Two questions about PostFix


jmacdonagh
14th August 2007, 19:08
I have a working configuration of Postfix running on my server. It handles purely virtual users, no local UNIX user delivery. However, there are two things that bug me:

1. I'm not able to set myhostname or mydomain to my actual domain. Instead, I have to set it up a subdomain which has an A record pointing to my IP. If I try to set either to my real domain, Postfix refuses all outside connections. Here's my postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
inet_interfaces = $myhostname, localhost
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination =
mydomain = asubdomain.mydomain.com
myhostname = asubdomain.mydomain.com
mynetworks = 127.0.0.1
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.2.10/README_FILES
relay_domains = $mydestination
sample_directory = /usr/share/doc/postfix-2.2.10/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = no
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_auth_only = no
smtpd_tls_cert_file = ...
smtpd_tls_key_file = ...
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
soft_bounce = yes
tls_random_source = dev:/dev/urandom
transport_maps = mysql:/etc/postfix/mysql_transport_maps.cf
unknown_local_recipient_reject_code = 550
virtual_mailbox_domains = mysql:/etc/postfix/mysql_mailbox_domains.cf

Now, my server hostname is mydomain.com, so I'm guessing that Postfix is thinking it's only going to be used for local delivery, and therefore blocks all outside connections.

2. Does Postfix remove the carriage return from mail messages? I believe the RFC spec requires that all MIME e-mail messages use CRLF (\r\n), but it seems that all the mail that Postfix (or actually, maildrop) delivers only has \n.

Thanks for any help!

Johann

falko
15th August 2007, 20:10
1. I'm not able to set myhostname or mydomain to my actual domain.Do you use that domain for your virtual users?

2. Does Postfix remove the carriage return from mail messages? I believe the RFC spec requires that all MIME e-mail messages use CRLF (\r\n), but it seems that all the mail that Postfix (or actually, maildrop) delivers only has \n.

That happens because it's a Linux system, and on Linux a linebreak is \n.

jmacdonagh
15th August 2007, 23:18
Thanks for your reply.

Do you use that domain for your virtual users?

Yes. I wanted to recieve mail for this domain, but I didn't want to have to set up system accounts for each address, so that's why I made it virtual.


That happens because it's a Linux system, and on Linux a linebreak is \n.

Right, I understand that. My question is, isn't that a violation of the RFC standard? Or does the standard simply require that mail being transmitted has to use CRLF's, but mail being stored can simply strip off those carriage returns if wanted? The only reason it's a problem is because I'm trying to use a third party library for parsing mail messages, but it's expecting CRLFs, when all I have are LF's. I'm wondering if there's a setting in Postfix to change this.

falko
16th August 2007, 15:51
Yes. I wanted to recieve mail for this domain, but I didn't want to have to set up system accounts for each address, so that's why I made it virtual.I think you should use a different domain for myhostname/mydomain.

Right, I understand that. My question is, isn't that a violation of the RFC standard? Or does the standard simply require that mail being transmitted has to use CRLF's, but mail being stored can simply strip off those carriage returns if wanted? The only reason it's a problem is because I'm trying to use a third party library for parsing mail messages, but it's expecting CRLFs, when all I have are LF's. I'm wondering if there's a setting in Postfix to change this.I don't know of such a Postfix setting.