Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-06-2006, 11:58 AM   #1
Registered: Aug 2004
Posts: 44

Rep: Reputation: 15
smtp server problem?

hey guys,

not sure if this is a newb question or not but i got a slight problem... posted it in the software forum before i realised it was wrong place...

FC1 running apache php and mySQL (Xampp install)
running Gallery2 software for displaying some photo's i've taken

the system can have registered users... i.e. send email for reqgistration

that is where the smtp server comes in...

by default gallery2 uses some sending thing in php and it doesn't seem to work...

so i've tried setting up sendmail... as far as i can see it's setup right...

i've commented out that bit about Smart Host which i understood meant that it just passed the mail onto another SMTP server and made it only listen on for security reasons.

now when i send mail whether it be by the gallery2 software or basically Telnetting in and writing the message... i get the mail bounced back... this is the mail that is received back (part of)...
   ----- Transcript of session follows -----
... while talking to
>>> DATA
<<< 550-Verification failed for <root@<omitted-ip>.reverse.<omitted>.com>
<<< 550-Unrouteable address
<<< 550-Administrative Prohibition.
<<< 550-We could not verify your email address
<<< 550 <root@<omitted-ip>.reverse.<omitted>.com>.
550 5.1.1 <<omitted-my-user-at-zen>>... User unknown
<<< 503 valid RCPT command must precede DATA
with my only limited knowledge... that looks to me like it's logging into the zen mail server to try and send it from there... and their server filters by ip address so if your not on their network you can't send using their servers...

now... have i completely misunderstood the idea of the SMTP server.... if not... what am i doing wrong?
Old 02-06-2006, 12:13 PM   #2
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
It's hard to tell what's wrong with your configuration, we don't see any conf files

However, there are probably 2 important things to check, and the first being your sendmail setup. I don't use sendmail, it's far too complicated for my simple needs, postfix is lightyears closer to what I need and easier to configure IMHO. A setting that you are looking for is your relayhost setting, not sure what the sendmail world calls that. It's basically what your email server 'runs' the email through to get it to the outside world. It may be localhost, it may be your ISP's email server. Either way, it's your emails portal out of the network.

The next setting would be what php.ini has as your email setup:
[mail function]
; For Win32 only.
;SMTP = localhost

; For Win32 only.
;sendmail_from =

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path = /usr/bin/sendmail
There's the snippet from php.ini You'll probably want to uncomment the unix line, and customize it to your needs.


Old 02-06-2006, 12:58 PM   #3
Registered: Aug 2004
Posts: 44

Original Poster
Rep: Reputation: 15

should have mentioned this part...

the server is based in a datacentre... therefore no (ISP) smtp server that it can relay to...

i need to run completely on it's own...

tried commenting out the Win32 options in the PHP.ini and uncommenting the unix one and it went haywire on me...

would you recommend postfix for my situation??? if so... could you point me to it...
Old 02-06-2006, 01:18 PM   #4
Registered: Aug 2004
Posts: 44

Original Poster
Rep: Reputation: 15
sendmail config if it helps

VERSIONID(`setup for Red Hat Linux')dnl
dnl #
dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
dnl  define(`SMART_HOST',`smtp.your.provider')
dnl #
dnl define(`confAUTO_REBUILD')dnl
define(`confTO_CONNECT', `1m')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
dnl define(`STATUS_FILE', `/etc/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
dnl #
dnl # The following allows relaying if the user authenticates, and disallows
dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links
dnl #
dnl define(`confAUTH_OPTIONS', `A p')dnl
dnl #
dnl # PLAIN is the preferred plaintext authentication method and used by
dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do
dnl # use LOGIN. Other mechanisms should be used if the connection is not
dnl # guaranteed secure.
dnl #
dnl #
dnl # Rudimentary information on creating certificates for sendmail TLS:
dnl #     make -C /usr/share/ssl/certs usage
dnl #
dnl define(`confCACERT_PATH',`/usr/share/ssl/certs')
dnl define(`confCACERT',`/usr/share/ssl/certs/ca-bundle.crt')
dnl define(`confSERVER_CERT',`/usr/share/ssl/certs/sendmail.pem')
dnl define(`confSERVER_KEY',`/usr/share/ssl/certs/sendmail.pem')
dnl #
dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP's
dnl # slapd, which requires the file to be readble by group ldap
dnl #
dnl define(`confDONT_BLAME_SENDMAIL',`groupreadablekeyfile')dnl
dnl #
dnl define(`confTO_QUEUEWARN', `4h')dnl
dnl define(`confTO_QUEUERETURN', `5d')dnl
dnl define(`confQUEUE_LA', `12')dnl
dnl define(`confREFUSE_LA', `18')dnl
define(`confTO_IDENT', `0')dnl
dnl FEATURE(delay_checks)dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
dnl #
dnl # The -t option will retry delivery if e.g. the user runs over his quota.
dnl #
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
dnl #
dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
dnl DAEMON_OPTIONS(`Port=smtp,Addr=, Name=MTA')dnl
dnl #
dnl # The following causes sendmail to additionally listen to port 587 for
dnl # mail from MUAs that authenticate. Roaming users who can't reach their
dnl # preferred sendmail daemon due to port 25 being blocked or redirected find
dnl # this useful.
dnl #
dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
dnl #
dnl # The following causes sendmail to additionally listen to port 465, but
dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed
dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't
dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS
dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps
dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.
dnl #
dnl # For this to work your OpenSSL certificates must be configured.
dnl #
dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
dnl #
dnl # The following causes sendmail to additionally listen on the IPv6 loopback
dnl # device. Remove the loopback address restriction listen to the network.
dnl #
dnl # NOTE: binding both IPv4 and IPv6 daemon to the same port requires
dnl #       a kernel patch
dnl #
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl
dnl #
dnl # We strongly recommend not accepting unresolvable domains if you want to
dnl # protect yourself from spam. However, the laptop and users on computers
dnl # that do not have 24x7 DNS do need this.
dnl #
dnl FEATURE(`accept_unresolvable_domains')dnl
dnl #
dnl FEATURE(`relay_based_on_MX')dnl
dnl #
dnl # Also accept email sent to "localhost.localdomain" as local email.
dnl #
dnl #
dnl # The following example makes mail from this host and any additional
dnl # specified domains appear to be sent from
dnl #
dnl #
dnl # masquerade not just the headers, but the envelope as well
dnl #
dnl #
dnl # masquerade not just, but @* as well
dnl #
dnl FEATURE(masquerade_entire_domain)dnl
dnl #
dnl MASQUERADE_DOMAIN(localhost)dnl
dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
Old 02-06-2006, 02:12 PM   #5
Registered: Aug 2004
Posts: 44

Original Poster
Rep: Reputation: 15
think i have worked out the problem now...

reverse dns if that seems right....

when i put in the from address i was putting in the domain of the site...

when i put in the datacentre as the domain it was from it was accepted...

so i'll just need to change the reverse dns thing...

damned if i know how...

the search continues......

thanx for the help
Old 02-07-2006, 01:51 AM   #6
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
To prevent spoofing, mail servers often try to use reverse DNS to retranslate your IP address (mail sender's IP) to your hostname (in the sender address on the mail envelope, for instance), just to see if you are really who you say you are.

Basically, this means that you need to have DNS set up properly. If it works right, then both the normal DNS lookups and rDNS (reverse DNS) lookups should work.

So, my advice is to start looking at your DNS configuration.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
SMTP Server Help Diederick Programming 4 09-08-2005 03:49 PM
Problem With SMTP Server Connection Manash Linux - Networking 3 10-02-2004 11:57 PM
SMTP server atze Linux - Software 3 07-11-2004 01:16 AM
Unable to access my ssh server and ftp server from the Internet, but smtp works foxone Linux - Networking 1 05-28-2004 05:17 PM
SMTP Server chrisk5527 Linux - Software 1 01-01-2004 03:01 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration