Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Postfix + Dovecot + Frustration

  1. #11
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    3,515
    Distro
    Ubuntu Development Release

    Re: Postfix + Dovecot + Frustration

    In the example I gave "mail" is acting like a user agent, making and delivering an e-mail to the local MTA (Mail Transport Agent). It runs under your local, authenticated, user ID. When you telnet in you are pretending to be an external MTA attempting to connect to the local MTA and deliver an e-mail. However, instead of asking to deliever an e-mail you ask it to relay it on to somewhere else, which is denied.
    I don't know about evolution and cann't comment on it.

  2. #12
    Join Date
    Mar 2011
    Beans
    23
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Postfix + Dovecot + Frustration

    Doug,

    thanks for getting back to me, so in light of the above how do i set up so i can send mail from computers other than the server?

  3. #13
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    3,515
    Distro
    Ubuntu Development Release

    Re: Postfix + Dovecot + Frustration

    Hi jumpytester,
    I have been giving you some bad advise, sorry. We should have had this figured out a couple of days ago.
    My "mail" example worked because it was using an interface declared in the "mynetworks" directive in main.cf. For both you and I, the telenet method did not work because, even though we were coming from a computer on our LAN, that LAN was not declared in the "mynetworks" directive. I am saying change this line:
    Code:
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    to this:
    Code:
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.0/24
    (I guessed at the netmask for your LAN from your server at .200 and your client at .100, but you check it). Of course, re-start postfix:
    Code:
    sudo /etc/init.d/postfix restart
    On my server, I went back and forth a few times and the telnet method worked or gave "relay access denied" as expected, based on that directive.

  4. #14
    Join Date
    Mar 2011
    Beans
    23
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Postfix + Dovecot + Frustration

    Doug,

    fantastic help it now works. last question i suspect you can answer. if i put i map email settings on to a mobile device if its not connected on my wifi it will get the relay access denied. how do i get round this or do i need to add a VPN?

    regards,

    John

  5. #15
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    3,515
    Distro
    Ubuntu Development Release

    Re: Postfix + Dovecot + Frustration

    Quote Originally Posted by jumpyjester View Post
    Doug,

    fantastic help it now works. last question i suspect you can answer. if i put i map email settings on to a mobile device if its not connected on my wifi it will get the relay access denied. how do i get round this or do i need to add a VPN?

    regards,

    John
    Hi jumpytester,
    I do not know the answer. perhaps someone else can help.

  6. #16
    Join Date
    Mar 2011
    Beans
    23
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Postfix + Dovecot + Frustration

    Doug S,

    Thank you so much fro your help.

    Regards,

    John

  7. #17
    Join Date
    Apr 2013
    Beans
    1

    Re: Postfix + Dovecot + Frustration

    Hey all, got an issue seems to be the same, getting the "Relay access denied" during i send mail to external mailboxes via telnet. mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.0/24 is not working for me. mayve i need to add something differend there.

    i ll post u one try from server mail to server mail (that woks!)
    and follows one try from server mail to consamartzis@gmail.com(that returns the error)

    so i go via telnet:

    Code:
    root@diaitaplus:~# telnet aceworx.com 25Trying 37.123.115.133...
    Connected to aceworx.com.
    Escape character is '^]'.
    220 mail.aceworx.com ESMTP Postfix (Ubuntu)
    EHLO mail.aceworx.com
    250-mail.aceworx.com
    250-PIPELINING
    250-SIZE 10240000
    250-ETRN
    250-STARTTLS
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    MAIL FROM: <info@aceworx.com>
    250 2.1.0 Ok
    RCPT TO: <csamartzis@aceworx.com>
    250 2.1.5 Ok
    data
    354 End data with <CR><LF>.<CR><LF>
    blah blah
    more blah
    .
    250 2.0.0 Ok: queued as 5D9D0E16F
    MAIL FROM: <info@aceworx.com>
    250 2.1.0 Ok
    RCPT TO: <consamartzis@gmail.com>
    554 5.7.1 <consamartzis@gmail.com>: Relay access denied

    Code:
    
    Apr 23 20:36:43 diaitaplus postfix/smtpd[12563]: connect from diaitaplus[37.123.115.133]
    Apr 23 20:37:52 diaitaplus postfix/smtpd[12563]: 5D9D0E16F: client=diaitaplus[37.123.115.133]
    Apr 23 20:38:06 diaitaplus postfix/cleanup[12568]: 5D9D0E16F: message-id=<20130423203752.5D9D0E16F@mail.aceworx.com>
    Apr 23 20:38:06 diaitaplus postfix/qmgr[12552]: 5D9D0E16F: from=<info@aceworx.com>, size=339, nrcpt=1 (queue active)
    Apr 23 20:38:06 diaitaplus postfix/virtual[12570]: 5D9D0E16F: to=<csamartzis@aceworx.com>, relay=virtual, delay=31, delays=31/0.01/0/0.69, dsn=2.0.0, status=sent (delivered to maildir)
    Apr 23 20:38:06 diaitaplus postfix/qmgr[12552]: 5D9D0E16F: removed
    Apr 23 20:38:57 diaitaplus postfix/smtpd[12563]: NOQUEUE: reject: RCPT from diaitaplus[37.123.115.133]: 554 5.7.1 <consamartzis@gmail.com>: Relay access denied; from=<info@aceworx.com> to=<consamartzis@gmail.com> proto=ESMTP helo=<mail.aceworx.com>
    thats my mysql log tailing:

    Code:
    109 Query SELECT destination FROM aliases WHERE mail='csamartzis@aceworx.com' and enabled = 1130423 20:38:06 106 Query SELECT destination FROM aliases WHERE mail='aceworx.com' and enabled = 1
    107 Query SELECT domain FROM domains WHERE domain='aceworx.com' and enabled = 1
    110 Connect mail@localhost on maildb
    110 Query SELECT maildir FROM users WHERE id='csamartzis@aceworx.com' and enabled = 1
    130423 20:38:52 109 Quit
    130423 20:38:57 106 Query SELECT destination FROM aliases WHERE mail='gmail.com' and enabled = 1
    107 Query SELECT domain FROM domains WHERE domain='gmail.com' and enabled = 1
    130423 20:39:06 110 Quit
    130423 20:39:57 106 Quit
    107 Quit

    and thats my main.cf (as u advised in post):

    Code:
    
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    
    
    
    
    
    
    
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname
    myorigin = aceworx.com
    
    
    
    
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no
    
    
    {...}
    
    
    myhostname = mail.aceworx.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination =
    local_recipient_maps =
    relayhost =
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.0/24
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    mynetworks = host
    
    
    
    
    
    
    
    
    
    
    {...}
    i also give u one ifconfig command resault because i think u may need that.

    Code:
    
    root@diaitaplus:~# ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:16:3e:bc:01:88
              inet addr:37.123.115.133  Bcast:37.123.115.255  Mask:255.255.255.0
              inet6 addr: fe80::216:3eff:febc:188/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:289162 errors:0 dropped:120 overruns:0 frame:0
              TX packets:25365 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:67813040 (67.8 MB)  TX bytes:2981835 (2.9 MB)
              Interrupt:32
    
    
    
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:1503 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1503 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:118527 (118.5 KB)  TX bytes:118527 (118.5 KB)


    Anyone knows what i have to add in "my networks" value to permit sending external mail from my mail server?
    Last edited by consamartzis; April 26th, 2013 at 01:51 PM.

  8. #18
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    3,515
    Distro
    Ubuntu Development Release

    Re: Postfix + Dovecot + Frustration

    Hi, and welcome to Ubuntu forums.

    I think you need to telnet to your lo interface from the same machine, not your external interface.
    Code:
     telnet 127.0.0.1 25
    Hey all, got an issue seems to be the same, getting the "Relay access denied" during i send mail to external mailboxes via telnet. mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.0/24 is not working for me. maybe i need to add something different there.
    Yes, that was for an internal network on 192.168.1.0, which you do not seem to have. It is not clear to me if you could or should add 37.123.115.133/32 there, or if that might create external relay allowed issues. Experiment with it (I don't have time at the moment).
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  9. #19
    Join Date
    Dec 2007
    Location
    Powder Springs, Ga
    Beans
    1,396
    Distro
    Ubuntu Development Release

    Re: Postfix + Dovecot + Frustration

    I'm having the same issues.

    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    myorigin = /etc/mailname
    
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    readme_directory = no
    
    # TLS parameters
    smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
    smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    
    smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = tekcom.dyndns.org, thomthom, localhost.localdomain, localhost
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.0/27
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    mydomain = tekcom.dyndns.org
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options = noanonymous
    smtp_tls_CAfile = /etc/postfix/cacert.pem
    smtp_use_tls = yes
    Code:
    #
    # Postfix master process configuration file.  For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master").
    #
    # Do not forget to execute "postfix reload" after editing this file.
    #
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (yes)   (never) (100)
    # ==========================================================================
    smtp       inet  n       -        n      -       -       smtpd
    #smtp      inet  n       -       -       -       1       #postscreen
    #smtpd     pass  -       -       -       -       -       smtpd
    #dnsblog   unix  -       -       -       -       0       dnsblog
    #tlsproxy  unix  -       -       -       -       0       tlsproxy
    #submission inet n       -       -       -       -       smtpd
    #  -o syslog_name=postfix/submission
    #  -o smtpd_tls_security_level=encrypt
    #  -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_reject_unlisted_recipient=no
    #  -o smtpd_client_restrictions=$mua_client_restrictions
    #  -o smtpd_helo_restrictions=$mua_helo_restrictions
    #  -o smtpd_sender_restrictions=$mua_sender_restrictions
    #  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    smtps      inet  n       -       n       -       -       smtpd
    #  -o syslog_name=postfix/smtps
    #  -o smtpd_tls_wrappermode=yes
    #  -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_reject_unlisted_recipient=no
    #  -o smtpd_client_restrictions=$mua_client_restrictions
    #  -o smtpd_helo_restrictions=$mua_helo_restrictions
    #  -o smtpd_sender_restrictions=$mua_sender_restrictions
    #  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    #628       inet  n       -       -       -       -       qmqpd
    pickup    unix  n       -       -       60      1       pickup
    cleanup   unix  n       -       -       -       0       cleanup
    qmgr      unix  n       -       n       300     1       qmgr
    #qmgr     unix  n       -       n       300     1       oqmgr
    tlsmgr    unix  -       -       -       1000?   1       tlsmgr
    rewrite   unix  -       -       -       -       -       trivial-rewrite
    bounce    unix  -       -       -       -       0       bounce
    defer     unix  -       -       -       -       0       bounce
    trace     unix  -       -       -       -       0       bounce
    verify    unix  -       -       -       -       1       verify
    flush     unix  n       -       -       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    proxywrite unix -       -       n       -       1       proxymap
    smtp      unix  -       -       -       -       -       smtp
    relay     unix  -       -       -       -       -       smtp
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       -       -       -       showq
    error     unix  -       -       -       -       -       error
    retry     unix  -       -       -       -       -       error
    discard   unix  -       -       -       -       -       discard
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       -       -       -       lmtp
    anvil     unix  -       -       -       -       1       anvil
    scache    unix  -       -       -       -       1       scache
    #
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # Many of the following services use the Postfix pipe(8) delivery
    # agent.  See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
    #
    # ====================================================================
    #
    # Recent Cyrus versions can use the existing "lmtp" master.cf entry.
    #
    # Specify in cyrus.conf:
    #   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
    #
    # Specify in main.cf one or more of the following:
    #  mailbox_transport = lmtp:inet:localhost
    #  virtual_transport = lmtp:inet:localhost
    #
    # ====================================================================
    #
    # Cyrus 2.1.5 (Amos Gouaux)
    # Also specify in main.cf: cyrus_destination_recipient_limit=1
    #
    #cyrus     unix  -       n       n       -       -       pipe
    #  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
    #
    # ====================================================================
    # Old example of delivery via Cyrus.
    #
    #old-cyrus unix  -       n       n       -       -       pipe
    #  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
    #
    # ====================================================================
    #
    # See the Postfix UUCP_README file for configuration details.
    #
    uucp      unix  -       n       n       -       -       pipe
      flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    #
    # Other external delivery methods.
    #
    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=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
    scalemail-backend unix    -    n    n    -    2    pipe
      flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
    mailman   unix  -       n       n       -       -       pipe
      flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
      ${nexthop} ${user}
    | Corsair Carbide Series® 300R | Intel Core i5 650@3.20Ghz| OCZ-Vertex3 120 Gb SSD | Western Digital 640 Gb HDD | Western Digital 1 Tb HDD |
    |Gigabyte GeForce GTX 950 Extreme | Ubuntu 16.04 x86_64 | Windows 10 Pro |


Page 2 of 2 FirstFirst 12

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
  •