0

Agenda: Please refer this link , here container1 forward smtp request to container4(10.1.2.2) for sending mail.

Install sendmail (apt-get install sendmail) in ubuntu after that adding below line in /etc/mail/sendmail.mc, I can able to send mail using telnet command.

define(`SMART_HOST', `gworks.mobi')dnl

sendmail listen port 25

easy for your reference

php varaible passing like

$smtpHost= '10.1.2.2';//your smtp host  ';
$smtpConf = ['port' => '25'];

but it throws error like

<mail@gworks.mobi> ... Relaying denied

before that I can directly pass isp provider of my mail

    $smtpHost= 'xxxxx.bluehost.com';//your smtp host  ';
    $smtpConf = [
        'auth' => 'login',//auth type
        'tsl' => 'tsl',
        'port' => '26',
        'username' => 'xxxxxx@gworks.mobi',//smtm user name
        'password' => 'xxxxxxxxxx'//smtppassword
    ];

can anyone explain how to send mail using sendmail for the above scenario?

  • Is 10.1.2.2 the local address of the container that the sendmail is running in ? – drookie Oct 10 '16 at 16:25
  • yes you right @drookie – Bilal Usean Oct 11 '16 at 4:22
  • 1
    And whet the sendmail -bv mail@gworks.mobi tells ? Plus, what does /etc/mail/local-host-names contain. Or wherever the local-host-names for this container is. – drookie Oct 11 '16 at 13:16
  • thanks @drookie I solved relaying issue by just add connect:10.1.2.4 RELAY in /etc/mail/access . here 10.1.2.4 is my remote host ip. – Bilal Usean Oct 11 '16 at 13:24
  • now I have an issue in authentication. if you can, please help serverfault.com/q/808345/366250 – Bilal Usean Oct 11 '16 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.