MAMP Pro: Difference between revisions

From HaFrWiki42
Jump to navigation Jump to search
Line 7: Line 7:
* Just fill in 'gmail.com' at the Domain of outgoing mail and restart the server.
* Just fill in 'gmail.com' at the Domain of outgoing mail and restart the server.
* Now open the mail log file which is located in the /var/log directory and you will see:
* Now open the mail log file which is located in the /var/log directory and you will see:
<pre>
<syntaxhighlight lang="bash"  line>
May 28 16:09:39 Harms-MBP-3.fritz.box postfix/master[78220]: fatal: bind fe80::1 port 25: Can't assign requested address
May 28 16:09:39 Harms-MBP-3.fritz.box postfix/master[78220]: fatal: bind fe80::1 port 25: Can't assign requested address
May 28 16:09:49 Harms-MBP-3.fritz.box postfix/master[78221]: fatal: bind fe80::1 port 25: Can't assign requested address
May 28 16:09:49 Harms-MBP-3.fritz.box postfix/master[78221]: fatal: bind fe80::1 port 25: Can't assign requested address
</pre>
</syntaxhighlight>
The reason of these errors is located in the wrong binding to the ipv6 instead of the ipv4.
The reason of these errors is located in the wrong binding to the ipv6 instead of the ipv4.


Line 22: Line 22:
* Now look in the mail.log <pre>tail -f -n 65 /var/log/mail.log</pre>
* Now look in the mail.log <pre>tail -f -n 65 /var/log/mail.log</pre>
* Resulting in
* Resulting in
<pre>
<syntaxhighlight lang="bash"  line>
May 28 16:28:29 Harms-MBP-3.fritz.box postfix/master[78439]: fatal: bind fe80::1 port 25: Can't assign requested address
May 28 16:28:29 Harms-MBP-3.fritz.box postfix/master[78439]: fatal: bind fe80::1 port 25: Can't assign requested address
May 28 16:28:40 Harms-MBP-3.fritz.box postfix/master[78440]: daemon started -- version 2.11.0, configuration /etc/postfix
May 28 16:28:40 Harms-MBP-3.fritz.box postfix/master[78440]: daemon started -- version 2.11.0, configuration /etc/postfix
May 28 16:29:26 Harms-MBP-3.fritz.box postfix/master[78440]: terminating on signal 15
May 28 16:29:26 Harms-MBP-3.fritz.box postfix/master[78440]: terminating on signal 15
May 28 16:29:26 Harms-MBP-3.fritz.box postfix/master[78443]: daemon started -- version 2.11.0, configuration /etc/postfix
May 28 16:29:26 Harms-MBP-3.fritz.box postfix/master[78443]: daemon started -- version 2.11.0, configuration /etc/postfix
</pre>
</syntaxhighlight>
* Fixed
* Fixed, the deamon has been started (see line2).
 
 


== Example mail.log ==
== Example mail.log ==

Revision as of 10:26, 6 September 2016

Mail

If you try to send a mail with MAMP Pro you will notice that this is not working out-of-the-box. MAMP Pro uses postfix as you can find on the last tab of the MAMP Pro app.

  • Just fill in 'gmail.com' at the Domain of outgoing mail and restart the server.
  • Now open the mail log file which is located in the /var/log directory and you will see:

<syntaxhighlight lang="bash" line> May 28 16:09:39 Harms-MBP-3.fritz.box postfix/master[78220]: fatal: bind fe80::1 port 25: Can't assign requested address May 28 16:09:49 Harms-MBP-3.fritz.box postfix/master[78221]: fatal: bind fe80::1 port 25: Can't assign requested address </syntaxhighlight> The reason of these errors is located in the wrong binding to the ipv6 instead of the ipv4.

To change this:

  • Edit the file main.cf located in the /etc/postfix/main.cf in terminal.
  • Type
    $ sudo nano /etc/postfix/main.cf
  • Add the line
    inet_protocols = ipv4
  • Save the file in nano.
  • Stop postfix:
     sudo launchctl stop org.postfix.master
  • Start postfix:
     sudo launchctl start org.postfix.master
  • Now look in the mail.log
    tail -f -n 65 /var/log/mail.log
  • Resulting in

<syntaxhighlight lang="bash" line> May 28 16:28:29 Harms-MBP-3.fritz.box postfix/master[78439]: fatal: bind fe80::1 port 25: Can't assign requested address May 28 16:28:40 Harms-MBP-3.fritz.box postfix/master[78440]: daemon started -- version 2.11.0, configuration /etc/postfix May 28 16:29:26 Harms-MBP-3.fritz.box postfix/master[78440]: terminating on signal 15 May 28 16:29:26 Harms-MBP-3.fritz.box postfix/master[78443]: daemon started -- version 2.11.0, configuration /etc/postfix </syntaxhighlight>

  • Fixed, the deamon has been started (see line2).

Example mail.log

The mail.log is located in the /var/log. After fixing the above issue the next problem is that the name of the host is taken as default name for the mail-send-account. <syntaxhighlight lang="bash" line> /Applications/MAMP/www/formula:HaFrMpro$ cat /var/log/mail.log Sep 6 10:00:19 Harms-MBP-2 postfix/pickup[15361]: 35FBB3FB6E3F: uid=501 from=<HaFrMpro> Sep 6 10:00:19 Harms-MBP-2 postfix/cleanup[15362]: 35FBB3FB6E3F: message-id=<20160906080019.35FBB3FB6E3F@mailer.gmail.com> Sep 6 10:00:19 Harms-MBP-2 postfix/qmgr[14705]: 35FBB3FB6E3F: from=<HaFrMpro@gmail.com>, size=902, nrcpt=1 (queue active) Sep 6 10:00:19 Harms-MBP-2 postfix/smtp[15364]: 35FBB3FB6E3F: to=<harm@harmfrielink.nl>, relay=smtp.gmail.com[74.125.136.109]:25, delay=0.55, delays=0.09/0.06/0.35/0.04, dsn=5.7.0, status=bounced (host smtp.gmail.com[74.125.136.109] said: 530 5.7.0 Must issue a STARTTLS command first. id1sm31874130wjb.21 - gsmtp (in reply to MAIL FROM command)) Sep 6 10:00:19 Harms-MBP-2 postfix/cleanup[15362]: BA5023FB6E42: message-id=<20160906080019.BA5023FB6E42@mailer.gmail.com> Sep 6 10:00:19 Harms-MBP-2 postfix/bounce[15365]: 35FBB3FB6E3F: sender non-delivery notification: BA5023FB6E42 Sep 6 10:00:19 Harms-MBP-2 postfix/qmgr[14705]: BA5023FB6E42: from=<>, size=2858, nrcpt=1 (queue active) Sep 6 10:00:19 Harms-MBP-2 postfix/qmgr[14705]: 35FBB3FB6E3F: removed Sep 6 10:00:20 Harms-MBP-2 postfix/smtp[15364]: BA5023FB6E42: to=<HaFrMpro@gmail.com>, relay=smtp.gmail.com[74.125.136.108]:25, delay=0.31, delays=0/0/0.25/0.05, dsn=5.7.0, status=bounced (host smtp.gmail.com[74.125.136.108] said: 530 5.7.0 Must issue a STARTTLS command first. b128sm25177085wmb.21 - gsmtp (in reply to MAIL FROM command)) Sep 6 10:00:20 Harms-MBP-2 postfix/qmgr[14705]: BA5023FB6E42: removed </syntaxhighlight>

See also

top

Reference

top