-   Linux - Software (
-   -   hostname/domainname/postfix setup with dynamic DNS from no-ip (

tesauce98 09-16-2003 01:12 AM

hostname/domainname/postfix setup with dynamic DNS from no-ip
Hey everyone, I'm generally new to Linux, although I can hold my own pretty well. I'm a little confused as far as hostname and domainname works.
Right now i'm just default localhost with no domain. I do however, have a dynamic DNS from as in ( points to my IP address). I have not setup this dynamic DNS on my linux box yet (localhost). I have a web and ftp server running and they work fine. But now i'm trying to get postfix working purely for sending e-mails generated from my web pages through a local SMTP server.
I've done the basic install of that, which works to a degree. I have noticed that I can't send mail to my personal e-mail (through my cable service provider, OptimumOnline), nor AOL accounts.

My info log under /var/log/mail/info states this message when sending to my personal e-mail (optonline):
Sep 15 23:46:27 localhost postfix/smtp[11661]: AA262185E0: to=<>,[], delay=1, status=bounced (host[] said: 550 5.1.8 invalid/host-not-in-DNS return address not allowed (in reply to MAIL FROM command))

And my e-mails to AOL accounts say:
Sep 16 00:41:03 localhost postfix/smtp[12167]: connect to[]: server refused mail service (port 25)

I can however receive e-mail to my yahoo account. Can anyone help me configure whatever hostname/domainname i need setup on the linux box itself, and what to fix in my so postfix will send e-mails to any address??

Also, whenever i start or stop postfix, i get this error message:
postfix: warning: My hostname localhost is not a fully qualified name - set myhostname or mydomain in /etc/postfix/
postsuper: warning: My hostname localhost is not a fully qualified name - set myhostname or mydomain in /etc/postfix/
postfix/postfix-script: warning: My hostname localhost is not a fully qualified name - set myhostname or mydomain in /etc/postfix/

which i believe is caused by the fact that i didn't declare $myhostname or $mydomain in because I wasn't sure what to use.

Thanks in advance.

MasterC 09-16-2003 06:57 PM

For fun, post up either your postfix/ OR the result of typing (as root):

Afterwards though, go ahead and setup the hostname and domain name variables in the

To find your system's hostname (if one exists), type:

The domain name should be the FQDN you have:

So, the:
$myhostname =

And the:
mydomain =



tesauce98 09-16-2003 08:22 PM

ok, well i edited /etc/hosts to be: localhost.localdomain localhost venom

( is my dynamic DNS name from that points to my cable modems IP)
based upon reading another topic. the 192.168 address is my servers IP address that is assigned by my router. after restarting, i noticed my login now says "root@venom" instead of "root@localhost", which i guess is a step in the right direction.

i also changed the myhostname and mydomain in to be:
mydomain =
myhostname =
(info taken from postconf -n)

i then restarted everything, and tried resending mail through the SMTP to my optonline, but i never got it and saw the same error message in /var/log/mail/info:

Sep 16 20:04:19 venom postfix/smtp[2709]: 7D42A185F9: to=<>,[], delay=0, status=bounced (host[] said: 550 5.1.8 invalid/host-not-in-DNS return address not allowed (in reply to MAIL FROM command))
Sep 16 20:04:19 venom postfix/cleanup[2708]: E4B92185F8: message-id=<>
Sep 16 20:04:19 venom postfix/nqmgr[1559]: E4B92185F8: from=<>, size=2459, nrcpt=1 (queue active)
Sep 16 20:04:19 venom postfix/local[2711]: E4B92185F8: to=<>, relay=local, delay=0, status=sent ("|/usr/bin/procmail -Y -a $DOMAIN")

i noticed that sender changed from "apache@loaclhost.localdomain" to "" I'm not sure where its getting that apache user from (maybe because the e-mail is generated by he php and apache webserver, under user apache).

i seemed to make some leeway, but i'm still not able to send mail to my optonline account. thanks for helpin me out masterc, i've read a lot of ur other posts about postfix and u seem to be the man to talk to.

MasterC 09-16-2003 10:02 PM

You are correct, in your php.ini OR in your httpd.conf file you'll see the settings for adjusting who sends email, depending on where the script is getting it's info.

As for it's rejection notice, send the email to me ( ), or check:
And see if there are any problems with the initiating of the messages. If not... I'm afraid to say that you might just be 'SOL' because the server you are trying to communicate with doesn't want to communicate with you for possible reasons outside your control, like:
Your domain is not an "official" domain (not likely);
Your DNS server is your ISP's, they notice the message is looking like it's coming from them, but it's not so they reject it it (for relay rejection, good thing, possible);
Your hasn't become active yet in all DNS's (possibly), and it may never in certain ones (not likely)

But we'll find out a bit more when you try to email me, because then we'll have logs on both sides of the transaction to see what's going on.


tesauce98 09-16-2003 10:58 PM

well that zoneedit thing won't work because i have port 25 incoming blocked, because when i ran a windows server, i had about 500 spam messages a day passed through and sent by my SMTP server, but thats not the problem, cuz i know the server sends mail when if it can.

i will however try sending an e-mail to you, so u can see about it. i can understand AOL people not getting my e-mail because they're very strict about what mail gets to their users for SPAM sake. but my major problem is sending mail to my optonline account:

Sep 15 23:46:27 localhost postfix/smtp[11661]: AA262185E0: to=<>,[], delay=1, status=bounced (host[] said: 550 5.1.8 invalid/host-not-in-DNS return address not allowed (in reply to MAIL FROM command))

btw, when u get the e-mail, u'll notice that my name is actually thesauce98, i made a typo while registering for this site but for arguments sake, i changed all my entries to tesauce98 :D

MasterC 09-16-2003 11:52 PM

he he he, yeah I got it :)

Which pretty much says "stuff is setup good" on your end.


Sep 16 20:01:29 [postfix/smtpd] connect from[68.1
Sep 16 20:01:29 [postfix/smtpd] A53E6C913:
Sep 16 20:01:29 [postfix/cleanup] A53E6C913: message-id=<20030917030111.427D9185>
Sep 16 20:01:29 [postfix/qmgr] A53E6C913: from=<apache@venom.thesauce.servehttp.
com>, size=782, nrcpt=1 (queue active)
Sep 16 20:01:29 [postfix/smtpd] disconnect from[6]
Sep 16 20:01:29 [postfix/local] A53E6C913: to=<>, relay
=local, delay=0, status=sent (maildir)

As a few other ideas, let's see...
This, doesn't look right:
So, let's check a few settings:
As root type:
And make sure it matches the above (venom), next, make sure your IP is pointing to:
And not something else, also, setup to use wildcards with that.

What we need to do is get things setup so your ISP will accept the email from you, that's where it's falling short, since obviously you can send mail elsewhere. To do that, we need to make sure you have a valid FQDN, which you should as long as it's been registered properly (which the noip ones seem to be instant with, so that should be done). But, like I said above, maybe you'll need to wait for your ISP to update their DNS servers as well.

Can you post up your full postfix/ as well as so we can take a look at them? Feel free to remove any sensitive info, simply let us know what you removed and what you changed it to (obviously not the actual data :D ).


tesauce98 09-17-2003 12:43 AM

omg! i received mail to my optonline account!!

i logged into my no-ip account page, and allowed wildcards (like u said). i also noticed a box for MX records, so i added under there as priority 5. i don't know which one made it work, but it did.

i still can't send to AOL accounts though, but maybe i'll never be allowed to. i could have sworn that my windows SMTP server was able to send to AOL accounts. so i'm not sure why i wouldn't be able to know. here is the results of postconf -n ( is quite large, and i'm tryin to get some sleep here!)

alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
delay_warning_time = 4
inet_interfaces = localhost
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailbox_command = /usr/bin/procmail -Y -a $DOMAIN
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain
mydomain =
myhostname =
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.0.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.0.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandrake Linux)
unknown_local_recipient_reject_code = 450

and here is

# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - y - - smtpd
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - y 60 1 pickup
cleanup unix n - y - 0 cleanup
#qmgr fifo n - n 300 1 qmgr
qmgr fifo n - y 300 1 nqmgr
#tlsmgr fifo - - n 300 1 tlsmgr
rewrite unix - - y - - trivial-rewrite
bounce unix - - y - 0 bounce
defer unix - - y - 0 bounce
flush unix n - y 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - y - - smtp
relay unix - - y - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - y - - showq
error unix - - y - - error
local unix - n n - - local
virtual unix - n y - - virtual
lmtp unix - - y - - lmtp
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
# maildrop. See the Postfix MAILDROP_README file for details.
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
# The Cyrus deliver program has changed incompatibly, multiple times.
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
cyrus unix - n n - - pipe
user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient

and just for reference, this is what the AOL error looks like:
Sep 17 00:30:05 venom postfix/smtp[5428]: connect to[]: server refused mail service (port 25)
Sep 17 00:30:05 venom postfix/smtp[5428]: C705E185FD: to=<>, relay=none, delay=846, status=deferred (connect to[]: server refused mail service)

thanks for making it work to this extent!

MasterC 09-17-2003 01:12 AM

Well, everything there looks good to me, hold out and see if anyone has any other suggestions, but I think you are pretty much 'good to go' on everything but AOL, and I don't think there's anything you can do in your conf's to fix that.

I don't know why you'd have been able to before, but maybe it had something to do with how the server relayed mail. It possibly relayed through your ISP's mail server instead of acting as it's own, making the emails appear to come from your ISP instead of you.



tesauce98 09-17-2003 11:45 AM

yea, i can't really remember how i had the windows server setup, maybe i did push the mail through my ISP server instead ... however, lets say i wanted to do that instead, how would i go about doing that? (just in case i decided that i need to send mail to AOL members)

btw, thanks for all your help so far :D

MasterC 09-17-2003 12:32 PM

Since I've never attempted such a beast, I think the route to go is:

Where I'd go with something like:
relayhost =

Rather than anything else you might think of, to get that, ping your ISP's outgoing mail server (you should have that info to setup your mail client to send email).

That'd my SWAG :D

Scientific Wild Azz Guess. ;)


tesauce98 09-17-2003 02:01 PM

haha, it seems ur SWAG was right!
i haven't confirmed yet, but i believe my mail to AOL users have gone through.

i added the relayhost = my ISP mail server
then i did a "postfix flush"
and now my mailq seems to be empty!

i assume it worked, but i'll have to get final confirmation from the people it e-mailed and make sure they got the e-mails.

thanks for your help MasterC!! :cool:
if i get anymore problems, i'll reply more

All times are GMT -5. The time now is 08:36 AM.