I have installed Postfix, clamav and so on on Debian Lenny 5.0 Now the problem i am having is the following : I am running a store application on my apache2 webserver which should be able to send email to customers and myself for order purposes. The emailaddress which is used by the application to send email with is : [email protected] , email is beeing sent out via SMTP ( mail.domain.com ) which is the local smtp mailserver on that server. But the error i recieve in the mail logs is the following : Jun 27 19:35:45 Aphrodite-Artemis postfix/smtpd[2770]: connect from mail.domain.com[x.x.x.x] Jun 27 19:35:45 Aphrodite-Artemis postfix/smtpd[2770]: NOQUEUE: reject: RCPT from mail.domain.com[x.x.x.x]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=SMTP helo=<www.domain.com> Jun 27 19:35:45 Aphrodite-Artemis postfix/smtpd[2770]: warning: non-SMTP command from mail.domain.com[x.x.x.x]: To: [email protected] x.x.x.x equals to the mailserver's IP domain.com equals my real domain name domain2.com is an emailaddress which is perfectly reachable Any idea wut the problem could be and how to resolve ?
You're trying to send an email to a domain that is not hosted on the local server, hence it needs to relay that mail to the server that DOES host domain2.com .. though as default you need to authenticate yourself before you're able to send relay mails and i don't see you auth before you send that mail. So either use an internal mail function for your application f.e. mail() if you use php, OR authenticate before you send. OORRRRR if you really really trust is, you could add domain2.com to your relay_domains setting in postfix, but that's not really what i would do, since it's an semi open relay for that domain then.
i did try the mail function in PHP, but somehow it didnt / doesnt work. Regarding the relaying : how come i am able to send normal email then via outlook from the mail.domain.com system to another domain ? Is it because i auth then or what ?
vaguely explaining something like this, tells me you haven't really looked into this ;-) That is because you're authenticated then.
well , not really, i did active the PHP mail, but that just doesnt seem to do mess ( does not even send mail ) so does not work. I will check the authenticating stuff regarding SMTP ... as far as i thought, i never do any SMTP authentication when getting email / sending email via outlook ( same domain )