Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 41

Thread: Set up an internal mail server

  1. #31
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: Set up an internal mail server

    Code:
    saad@beast:~$ telnet debian.javed.local 25
    telnet: could not resolve debian.javed.local/25: Name or service not known
    saad@beast:~$ telnet debian 25
    Trying 127.0.1.1...
    Trying 192.168.0.106...
    telnet: Unable to connect to remote host: Connection refused
    saad@beast:~$ telnet javed.local 25
    telnet: could not resolve javed.local/25: Name or service not known

  2. #32
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Set up an internal mail server

    OK, so telnet debian 25 worked but the connection was refused.

    I am not an expert on mailservers, it seems something in the configuration is blocking you. I remember in one of the postfix config files you seem to have enabled secure connection (encryption). Not sure how it should work.

    The DNS configuration looks OK to me since you can ping debian and dig returns expected results. Now you need to take a look at the email configuration, and maybe consider installing dovecot so you can use email clients.

    Testing with email clients would be much better than in the command line. After all, you expect people to use email clients, not just to set up a test system where they can only send emails at the command line.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  3. #33
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: Set up an internal mail server

    Thanks for all the help Darkod. I'm going to figure this out.

  4. #34
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: Set up an internal mail server

    Been playing with postfix config. Like solving a rubik's cube. Messing with one option after another....

  5. #35
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Set up an internal mail server

    Since this is a VM, if you have a snapshot of the VM with only debian installed, I suggest you go back to that snapshot and try with postfix again. Try with the official documentation and for a start keep it simple, no SSL, nothing.
    It doesn't look complicated in the official documentation:
    https://help.ubuntu.com/12.04/serverguide/postfix.html

    After each important step, make a snapshot that you can go back to.

    Now that you know how to do the dnsmasq DNS service, I suggest you make a clean debian install (or restore a snapshot if you have it), do the dnsmasq again, and make a snapshot of that situation to keep it. Then continue with postfix.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  6. #36
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,999
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Set up an internal mail server

    I skimmed the last couple of days of postings, and one question kept popping up, how will the client machines find the mailserver.

    The answer is simply how you define the SMTP server in the client email software. Have all the clients use the server's IP address, or its hostname since it looks like you have DNS running now.

    Also there seemed to be some notion that mail from user1@host1 addressed to user2@host2 will somehow appear on host2. All the mailboxes are on the server. Mail should be addressed to user@javed.local.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  7. #37
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: Set up an internal mail server

    Quote Originally Posted by SeijiSensei View Post
    I skimmed the last couple of days of postings, and one question kept popping up, how will the client machines find the mailserver.

    The answer is simply how you define the SMTP server in the client email software. Have all the clients use the server's IP address, or its hostname since it looks like you have DNS running now.

    Also there seemed to be some notion that mail from user1@host1 addressed to user2@host2 will somehow appear on host2. All the mailboxes are on the server. Mail should be addressed to user@javed.local.
    Just to update you: debian is a VM installation i set up to test dns and postfix. it asked for a domain name during installation so i gave it one:javed.local. No other machine on the network is part of javed.local or any domain.

    What i'm confused about is that pinging debian works ... even on systems where debian(192.168.0.106) is not set as the nameserver in resolv.conf... I think its because all of them are in the same workgroup... but pinging debian.javed.local does not work from anywhere...is it because none of the machines are in javed.local domain?
    i.e.

    beast(192.168.0.104) nameserver 192.168.0.106 in /etc/resolv.conf
    --->ping debian WORKS
    --->ping debian.javed.local NOT FOUND

    home-server(192.168.0.105) nameserver 127.0.0.1 in /etc/resolv.conf
    --->ping debian WORKS
    --->ping debian.javed.local NOT FOUND

    So I can't send email to anybody because no computer on the network is able to see debian.javed.local...
    Last edited by sbjaved; November 20th, 2012 at 07:27 PM.

  8. #38
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: Set up an internal mail server

    Okay I haven't yet figured out the ping thing. But on debian, I edited /etc/hosts which was:
    Code:
    127.0.0.1	localhost
    127.0.1.1	debian.javed.local	debian
    192.168.0.106	debian.javed.local
    I changed it to:
    Code:
    127.0.0.1	localhost
    #127.0.1.1	debian.javed.local	debian
    192.168.0.106	debian.javed.local	debian
    After that I tried sending an email from saad@beast(192.168.0.104) to saad@debian(192.168.0.106)
    Code:
    saad@beast:~$ telnet debian 25
    Trying 192.168.0.106...
    Connected to debian.javed.local.
    Escape character is '^]'.
    220 debian.javed.local ESMTP Postfix (Debian/GNU)
    mail from: saad@beast
    250 2.1.0 Ok
    rcpt to: saad@debian
    550 5.1.1 <saad@debian>: Recipient address rejected: debian
    rcpt to: saad@debian.javed.local
    250 2.1.5 Ok
    data
    354 End data with <CR><LF>.<CR><LF>
    Subject: Test
    
    Hi,
    This is a test 
    .
    250 2.0.0 Ok: queued as DEA444AF71
    quit
    221 2.0.0 Bye
    Connection closed by foreign host.
    It WORKED
    Here is the postfix conf I used:
    Code:
    myhostname = debian.javed.local
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = debian.javed.local, localhost.javed.local, localhost
    relayhost = 
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128, 192.168.0.0/24
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    default_transport = error
    relay_transport = error
    I also commented out all the TLS parameters in the postfix conf.

    Now how do I send an email from saad@debian(192.168.0.106) to saad@beast(192.168.0.104)??
    Last edited by sbjaved; November 20th, 2012 at 09:15 PM.

  9. #39
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Set up an internal mail server

    As I and Sensei already mentioned, email sending is NOT machine to machine. It's mailbox to mailbox.

    You don't send email from @debian to @beast.

    You send it from user1@javed.local to user2@javed.local. By the way, when sending email you should use @javed.local not @debian.

    The users will access their mailbox with email clients and they could do that from any machine in your network. So, you need something like dovecot to provide POP3 and IMAP access, and some email client on the machines.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  10. #40
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: Set up an internal mail server

    Quote Originally Posted by darkod View Post
    As I and Sensei already mentioned, email sending is NOT machine to machine. It's mailbox to mailbox.

    You don't send email from @debian to @beast.

    You send it from user1@javed.local to user2@javed.local. By the way, when sending email you should use @javed.local not @debian.

    The users will access their mailbox with email clients and they could do that from any machine in your network. So, you need something like dovecot to provide POP3 and IMAP access, and some email client on the machines.
    I see. All mailbox accounts will be on debian and users will access their mailboxes.
    But the problem is I can't seem to send email to saad@javed.local

    Code:
    saad@debian:~$ telnet debian.javed.local 25
    Trying 192.168.0.106...
    Connected to debian.javed.local.
    Escape character is '^]'.
    220 debian.javed.local ESMTP Postfix (Debian/GNU)
    mail from: root@javed.local       
    250 2.1.0 Ok
    rcpt to: saad@javed.local
    550 5.1.1 <saad@javed.local>: Recipient address rejected: javed.local
    rcpt to: saad@debian.javed.local
    250 2.1.5 Ok

Page 4 of 5 FirstFirst ... 2345 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •