Fedora Servers :: Force Php Mail() Through Postfix + Auth?
Mar 8, 2011
I'm a bit lost with the PHP/Sendmail configuration, maybe somebody could help me getting back on the right track. Following situation:
* accepts smtp on port 25 but from his own domains. Some policy and spamchecks through amavisd are made.
* accepts submission on port 587 and 465 from authenticated users only. Quota and spamchecks prevent outgoing spam.
So I'm enforcing a very strong outgoing spam-policy but the users are still able to use the php mail() function to send spam through the /usr/sbin/sendmail command.
My users have access to their own php.ini so my idea was to somehow enforce the delivery through the local postfix on port 587 or 465 and just let them enter their user/pass in their php.ini. (I suppose, their might be a cleaner-solution ).
Unfortunately, my configurations like smtp_host, port, user etc. are getting ignored if the sendmail_path line is active. But if I comment this line out, php just uses the default, which is the same as configured in the sendmail_path line - so it's active whether i use the line or not (setting it to an invalid command breaks the mail() function completely).
how can I enforce my anti-spam policy on the php mail() command?For my ssh users I just blocked the outgoing connection to localhost on port 25 which seems to work so far, but somehow the postfix-sendmail-wrapper just ignores this.
i have configured mail server with postfix with dovecot with no encryption:When connecting with Thunderbird imap is working fine. when sending email from another domain to this domain again it is fine. but when i want to send mail frommy domain to another it gives me error and this is /var/log/maillog:
I have been faithfully following the postfix/sasl/etc install docs from [URL] and seem to have hit a minor snag with SASL authentication for SMTP. KMail cryptically leaves me with a generic auth fail notice and tailing the mail logs gives me
Two exchange servers internally. One is setup for example.com (192.168.1.10) and the other is setup for example2.com (192.168.1.20) Both are behind a single public IP.
I want to use postfix to sit in front of the two exchange servers. Postfix will accept mail for both domains and relay to the appropriate server. I have postfix installed with only defaults at this point.
I installed FC10, and configured everything to work with my static IP address [URL]. As far as email goes everything works except for the php script on my website. This script worked fine on my previous install, and it appears to actually submit the email as shown in the maillog:
Aug 12 14:21:02 myhome postfix/pickup: 37406BFDD9: uid=48 from=<apache> Aug 12 14:21:02 myhome postfix/cleanup: 37406BFDD9: message-id=<20090812192102.37406BFDD9@www.myhome.com>
I also created the following php script to test
<? (mail ("test@myhome","Test message","this is a test")) ?>
And I was able to send successfully with this script with the only difference being it was sent by root rather than apache. This leads me to believe it's some sort of rights issue with the apache user. I wouldn't be surprised is SELinux was behind it all. I spent days and days after installing wordpress trying to get it to connect to mysql, and that turned out to be a SELinux issue.
I have an issue with postfix and my server.One account (mine) is not considered as spam by no one. But all the other users are treated as spam by yahoo, and hotmail. And I can't understand why.Here are the header from one user who sent an email to my yahoo account (treated as spam):
Code: From userNAme Sat May 22 01:52:27 2010 X-Apparently-To: email@example.com via 126.96.36.199; Fri, 21 May 2010 14:52:55 -0700
I set up my mail server using the guide here: [URL] I am able to receive mail, I can send mail locally, but I can't send to external addresses. This is in my mail.log: Quote: Jun 30 14:40:43 Server postfix/smtp: 2FD9322015BF: to=<firstname.lastname@example.org>, relay=none, delay=1634, delays=1484/0.02/150/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[188.8.131.52]:25: Connection timed out)
The scenario: We have an external server that runs HTTP/DB servers for out shop system. Then, there's our local, in-house infrastructure that runs a.. yeah... Exchange 2010. The shop system on the external server needs to send mails to customers (order confirmations, invoices, etc.). seing as sending them directly through the local MTA (Postfix) would cause mail delivery problems because of reverse DNS issues, i've set the Postfix MTA to act as a satellite to our in-house Exchange Server, so the Exchange sends the mail instead, giving recipient mail servers a valid reverse DNS lookup.
Now, mails sent by the (proprietary, uneditable) shop system are relayed correctly and sent to the target e-mail address. My problem is: Mails not sent by the shop system, but by our own PHP scripts which run on that same external servers, are NOT relayed properly. So the Exchange is fine with the mails sent by the shop system, but not the mails sent by our scripts. This is what i get in the mail.log: The successfully relayed mail sent by the shop system:
at first, sendmail was installed and everything was working great. all the email sent from forum and webform I host as been sent correctly in the reception box of the recipient. But I want postfix as MTA to do my delivery to all my virtual domain I host.
when sendmail is uninstalled and postfix installed and all services configured(php included) and restarted(apache included), when I send a email from command line or from web form, the email goes in junk mail for some ISP email address and for gmail and the email did'nt show at all for hotmail. but email sent from forum (phpbb) still goes in reception box like normal email do.
I tried do change the headers, who was working with sendmail, of the email sent from web form without success.
so I tried to uninstall postfix and reinstall sendmail, restarted all service and every thing was back to normal... email sent goes in reception box.
I tried it twice.... sendmail, postfix, sendmail, postfix and now back to sendmail for a working solution until I get postfix working.
I tried with spf entry in my dns, I tried allowed icmp packet from outside with iptables, I tried many different headers for my email. My ip is not blacklisted anywhere.
I installed and configured postfix per the guide on help.ubuntu.com. Everything seems to work fine with smtp and it says that my emails are being sent, but I never receive them.What could be causing this problem?The local mailbox shows that the email was sent.Mail.log shows that the message was delivered to the mailbox.
I'd like to enable SSL authentication in vsftpd.conf but still somehow force plain data transfer; even if the client is capable of SSL data transfer. The way I understand the config, if I set ssl_enable=YES then if client wants to use SSL for data transfers, it can. I wish for force plain data transer, but still have SSL enabled for login. Is this possible with vsftpd?
I am trying to make my elastix voip server to send and receive e-mails. It has built in Postfix mail server, and i tried to configure it.I am not sure about some parameters, such as domain and hostname.Either way, i will attach my config file and the errors that i get from log and mail queue as i get them from webmin.
I set up my Postfix/Dovecot Sasl implementation according to the Server Docs. Now it worked both for SSL POP3 and sending via SSL SMTP. But recently it simply stopped accepting my mail, I can't send out.
I'm on Ubuntu 10.04 and using Postfix 2.7 with Dovecot's SASL. The issue is when sending e-mail it takes a bit of time to send. LIke for it to get connected it takes around 15.20 seconds. How can I reduce this delay so it can be sent faster?
I do not know why I could send email outside but not receive. I use relay to my ISP that port 25 is blocked by my ISP. What can I doing with configuration when it should be works to receive mail? Okay, I have sent a test e-mail between localhost and it works. I can send from mailserver to my gmail without problem. So why I cannot receive email from gmail?
Let me start off by saying I am experienced with computers, though my knowledge of Linux and networking is limited. I've just recently started setting up a Ubuntu 10.04 server to be a SMTP server. I've followed this guide by the letter: [URL] What I've attempted, to test the server, is the following:
telnet localhost 25 ehlo localhost
(this returns all the desired information) I then do a MAIL FROM my domain which is accepted, and try to do a RCPT TO an external mail server (gmail) to test sending an email. I am then told 'Relay Access Denied'. I'm sure that there's something fundamental that I'm either not understanding or not doing correctly. I simply want an SMTP server that can send to other domains. What do I need to do?
I have a mail server running Postfix and the problem I'm running into is that when trying to send mail, I get a "relay access denied" error.Inside my main.cf, I did not specify 'smtpd_recipient_restrictions' so by default, the variable is:
Code: smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination The 'mynetworks' variable looks like this:
Setup my postfix mail server and courier-imap/pop. My postfix server now is working with tls and saslauthd, I can send/receive email inside my domain as well as outside. However, I need two separate smtp and imap/pop3 server, I mean two machine - one with smtp function and one with imap/pop3 function working together.
Alright guys, I've looked over every thread regarding this issue on this forum, and many others; yet I cannot find out why my mail is being bounced without error from my external gmail account.From what I've seen, you guys need to start off by seeing my postconf -n
I'm running a server with Ubuntu 10.04 and I have installed postfix and courier. The server can recieve mail and I can fetch them using POP, but when I try to send mail it doesn't work. Postfix itself can send email if i telnet from localhost and I am using my ISP as a relay because they block port 25. I'm using outlook 2007 on my client computer and it just says that the server rejects the login attempt and tells me to check my username and password. Postfix listens on port 12 as well because the client connection also has outgoing on port 25 blocked. I have tried to use telnet to connect to the server, and I can connect. This is what I get:
Now what? I've tried searching for the answer but all I can come up with is AUTH PLAIN or AUTH LOGIN, but I don't know what to type after that.
I have a problem with my VPS not being able to send any emails to Yahoo! addresses. Each time someone with a mail account tries to send something to a Yahoo! address, the email stays stuck in the mail queue and a 'delayed mail (still trying)' message is sent back to the user. I understand that Yahoo! has a tendency to block mail servers on a whim, but what I'd like to know is, how can I prevent Postfix from specifically retrying to send emails to Yahoo! mail servers? I don't want to stop retries to other mail servers.
I'm hoping someone here can help, as I've been beating my head on the wall for a week now with little advancement. I've found a number of tutorials on setting this up, however none of them have gotten me 100% of the way there. Here's my situation: home-based Fedora server (Core 8), running sendmail 8.14.2-1. Connecting to hosting company's smtp server over port 587, to bypass Verizon's blocking of port 25.
My /etc/mail/sendmail.mc file looks like this (comment lines removed):Quote:
make install then i got this error: postfix: fatal: chdir(/usr/libexec/postfix): No such file or directory make: *** [install] Error 1 I don't understand why it's checking the usr/libexec folder for the daemons although I've set the folder to /opt/product/postfix-2.6.5/libexec in the makefile. Here is also the cat of my makedefs.out:
I'm trying to config a customer's samba server to use a MS 2003 SBS for auth. The samba is for file sharing only config'ed with disk quota's. Currently the samba is config'ed for auth = Users. But I want a central point for user auth, and since they already have the sbs in place, I'd like to use that.
so i set out to change the default smtp port the server uses because my ISP blocks port 25 and i need the email to work in outlook. this morning i could receive email, but not send it. so i did some research and thought that i needed to edit the master.cf file in /etc/postfix/ by commenting out this line: smtp inet n - n - - smtpd -oand replace it with587 inet n - n - - smtpd (587 being the port i want to use)somewhere along the lines postfix server stopped running and now i cannot get it to start.if i try using SSH it crashes immediately and if i restart it in simple control panel nothing happens