LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Dovecot, postfix pop3/imap server issue (https://www.linuxquestions.org/questions/linux-server-73/dovecot-postfix-pop3-imap-server-issue-789947/)

konduktorn 02-18-2010 09:26 AM

Dovecot, postfix pop3/imap server issue
 
Hi

I'm having a problem setting up Dovecot:

The command
Code:

#telnet user smtp
returns:
user/smtp: Temporary failure in name resolution.

Does this mean that there is a problem in the aliases file? (/etc/aliases)

Code:

#telnet localhost smtp
, works fine...

Here is the configuration!

postconf -n returns:
Code:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 127.0.0.0/8
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
unknown_local_recipient_reject_code = 550


Dovecot -n returns:
Code:

# 1.0.7: /etc/dovecot.conf
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
mail_location: maildir:~/Maildir/
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib64/dovecot/imap
mail_plugin_dir(imap): /usr/lib64/dovecot/imap
mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3
imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh
imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh
imap_client_workarounds(pop3): outlook-idle
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
  mechanisms: plain login
  passdb:
    driver: pam
  userdb:
    driver: passwd
  socket:
    type: listen
    client:
      path: /var/spool/postfix/private/auth
      mode: 432
      user: postfix
      group: postfix

aliases:

Code:

# Basic system aliases -- these MUST be present.
mailer-daemon:    postmaster
postmaster:    root

# General redirections for pseudo accounts.
bin:        root
daemon:        root
adm:        root
lp:        root
sync:        root
shutdown:    root
halt:        root
mail:        root
news:        root
uucp:        root
operator:    root
games:        root
gopher:        root
ftp:        root
nobody:        root
radiusd:    root
nut:        root
dbus:        root
vcsa:        root
canna:        root
wnn:        root
rpm:        root
nscd:        root
pcap:        root
apache:        root
webalizer:    root
dovecot:    root
fax:        root
quagga:        root
radvd:        root
pvm:        root
amanda:        root
privoxy:    root
ident:        root
named:        root
xfs:        root
gdm:        root
mailnull:    root
postgres:    root
sshd:        root
smmsp:        root
postfix:    root
netdump:    root
ldap:        root
squid:        root
ntp:        root
mysql:        root
desktop:    root
rpcuser:    root
rpc:        root
nfsnobody:    root

ingres:        root
system:        root
toor:        root
manager:    root
dumper:        root
abuse:        root

newsadm:    news
newsadmin:    news
usenet:        news
ftpadm:        ftp
ftpadmin:    ftp
ftp-adm:    ftp
ftp-admin:    ftp
www:        webmaster
webmaster:    root
noc:        root
security:    root
hostmaster:    root
info:        postmaster
marketing:    postmaster
sales:        postmaster
support:    postmaster


# trap decode to catch security attacks
decode:        root

# Person who should get root's mail
#root:        marc

Please be gentle with responses, I'm a newbie regarding Linux and mail servers =)

//Konduktorn

redgoblin 02-18-2010 10:22 AM

The telnet command is;

Code:

telnet <hostname> <port>
Unless you have a host (machine) on your network that you refer to as "user" then the connection wont work. However, that's why your second entry does work.

Code:

telnet localhost smtp
Localhost is a shorthand way of refering the local machine (it translates to an IP address of 127.0.0.1)

You can set up shorthand names for machines by editing the file /etc/hosts Although be sure to back it up as it's kind of important.

The smtp part is also short hand. It looks up a port number from a list of known ports/services (I think from /etc/services). So you could in fact re-write the whole command as;

Code:

telnet 127.0.0.1 25
And have the same effect.

In short, the machine name "user" doesn't mean anything to the machine you're on. hence the error of failure in name resolution.

As a side point; are you actually using Dovecot as an SMTP server? It normally acts as an IMAP server which you'll find on port 143.

Try the following two commands and see what service responds to you.

Code:

telnet localhost smtp
Code:

telnet localhost imap
Enjoy

konduktorn 02-19-2010 12:00 PM

Quote:

Originally Posted by redgoblin (Post 3868254)
The telnet command is;

Code:

telnet <hostname> <port>
Unless you have a host (machine) on your network that you refer to as "user" then the connection wont work. However, that's why your second entry does work.

Code:

telnet localhost smtp
Localhost is a shorthand way of refering the local machine (it translates to an IP address of 127.0.0.1)

You can set up shorthand names for machines by editing the file /etc/hosts Although be sure to back it up as it's kind of important.

The smtp part is also short hand. It looks up a port number from a list of known ports/services (I think from /etc/services). So you could in fact re-write the whole command as;

Code:

telnet 127.0.0.1 25
And have the same effect.

In short, the machine name "user" doesn't mean anything to the machine you're on. hence the error of failure in name resolution.

As a side point; are you actually using Dovecot as an SMTP server? It normally acts as an IMAP server which you'll find on port 143.

Try the following two commands and see what service responds to you.

Code:

telnet localhost smtp
Code:

telnet localhost imap
Enjoy

Thank you very much for clearing up!

Perhaps you'll be able to assist me further:

I registered a domain at dyndns.com, example.mine.nu
How do i "Bind" this to my server, to the mail addresses so to speak, if you understand?

And also, how do I register this on MX records?

I hope you understand what I mean, I'm used to all the names and terms.

/Konduktorn

redgoblin 02-19-2010 04:41 PM

I haven't used dyndns so this might be a bit vague. If anyone else has they might be able to offer better advice.

You need to tell dyndns what your IP address is. If you're on a connection that changes IP periodically then you'll need a way to update your dyndns record. That's a separate problem and probably best to try they're help files or forums.

Once you've entered your IP address into your account all requests to your domain (example.mine.nu) will be sent to your modem/router.

If you're using a router than you need to set up some kind of port forwarding from the router to the machine that runs the service you're trying to serve. Obviously forward the required port. 25 for mail, 22 for ssh, 80 for web. If you have access to an account on an outside machine you can now test that with your new found telnet skills ;) By using telnet (from the outside) you should get a connection to the appropriate service.

MX records are simple a subset of a DNS record used specifically by email. It means that you can host your email on a separate machine to your webserver. In your case you simple want your MX record to point to the same IP as the rest of your domain.

In summary what you want is;

1) Correct IP address in dyndns
2) Same IP for your MX record
3) Set up port forwarding on your router to pass the connection to the correct machine.
4) Set up a service on the receiving machine.

Sorry that's not more specific. You best bet from here is to google around for a few examples on seting up web/mail servers on your distribution.

One thing to always keep in mind. If you open up a service to the outside world it's very important that you keep that machine up to date and consider any possible insecure setups. It's a hostile world out there on the net.

Good luck, don't give up and remember google/man pages are your friend.


All times are GMT -5. The time now is 07:12 AM.