![]() |
Configuring SMTP to work on FreeBSD 9.0 server.
Okay, so I'm working on another project where I've set up a FreeBSD system on one of my older computers. I've set up Apache, PHP, mySQL, and myPHPadmin on the box and tested a few PHP scripts from hotscripts.com
The box is running on a local IP address of 192.168.1.77 as hostname "freebsd" and my router is set to forward it any incoming connections to port 80. One of the scripts I am trying to install requires an SMTP server so in the config files I set it as: $email_server = 'outgoing.verizon.net'; // What mail server (an FQDN DNS name) should emails be sent from? However, this doesn't seem to work and I'm wondering if I need to setup my own SMTP on the box itself, or do I need to install something such as mail/ssmtp to get it to work? Telnet into the SMTP server on port 25 is successful. Code:
freebsd# telnet outgoing.verizon.net 25 The script I am trying to install is called BlackNova Traders and can be found at http://sourceforge.net/projects/blacknova/ Thanks. |
It's difficult to tell from just a variable declaration what the script is trying to do. Does your SMTP server require authentication, or just being on the correct IP block is enough?
|
I browsed the code tree for occurrences of email_server, and I only see one, and it's in that file only. Maybe it's a future feature that hasn't been implemented yet?
|
Browsing further through the code, it seems to take advantage of mail(), which is a built-in function and will use the SMTP settings of your server.
|
Quote:
Quote:
|
Quote:
http://www5.us.freebsd.org/doc/handb...oing-only.html |
Quote:
I'm working on MUCH more complex code in another window, and it has 85% of my focus while I wind down from a rough day of looking at said code ... so this is a welcome distraction for a bit. |
Quote:
|
Quote:
|
Quote:
* Check your error logs. * Check your sendmail config, if that's what you're using. * Check if you can mail any of the local accounts on the server. |
Quote:
/var/log/maillog Code:
Dec 4 22:46:12 freebsd sendmail[3938]: qB53kC5j003938: from=www, size=125, class=0, nrcpts=1, msgid=<[email protected]>, relay=www@localhost /etc/mail/sendmail.cf Code:
O DaemonPortOptions=Name=IPv4, Family=inet Code:
freebsd# sendmail -bv root Code:
freebsd# mail mail seems to be working fine internally just not outbound. |
587, if I remember correctly, is the "alternate" SMTP port, designed to get around the ISP blocking port 25.
In your case, sendmail probably isn't properly configured to talk to the outside world. It may need ports exposed (or forwarded) on the router, or some other settings. Next thing on your list should be checking out the sendmail docs, specifically for FreeBSD. |
wouldnt any outbound email server need a public ip address?
|
when you ready for a managed freebsd 9 box let me know :)
|
Quote:
Code:
29.3.1 /etc/mail/access Code:
localhost.localdomain RELAY Code:
freebsd# pwd Quote:
|
After editing the /etc/mail/access entries I began receiving the following errors:
Code:
Dec 5 03:03:45 freebsd sm-mta[1106]: My unqualified host name (localhost) unknown; sleeping for retry Code:
::1 localhost freebsd Code:
::1 localhost freebsd freebsd.local freebsd.local.home Code:
sendmail_enable="YES" Code:
freebsd# sockstat -4 -l Code:
freebsd# sendmail *******@yahoo.com |
Check your spam folder. Generally speaking, emails sent from a machine without a FQDM tend to be spam.
|
All times are GMT -7. The time now is 05:10 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123