Log emails sent via PHP mail

Discussion in 'Installation/Configuration' started by pecka33, Apr 28, 2020.

  1. pecka33

    pecka33 Member

  2. Steini86

    Steini86 Active Member

    I don't know what you have done. Have you adjusted the location of the logfile?
    Code:
    //$logfile = '/tmp/mail_php.log';
    $logfile = '/var/log/mail.form';
    There are a lot of comments to this howto, have you read them (they contain solutions to some of the problems)
     
  3. pecka33

    pecka33 Member

    Thank you. Yes, before i changed path to log file, as i read in comments. I have just create file with codes, edit php ini and change path to log file a created - mail.form
    But emails send via php not log in this file. Maybe i have to do something else. I try look at this again.
     
  4. pecka33

    pecka33 Member

    Hi, is here anybody who could help me how can i figure out the problem? I did changes i should did, but after a tried to send test email via php file /var/log/mail.form is still empty. I checked emails logs, but i can not found problems.
     
  5. Steini86

    Steini86 Active Member

    My guess is that you edited the wrong php.ini file. You have to edit the file of the version used. If you are using ispconfig, then add the line to your custom php.ini settings. If not, you have to find out which ini files are used. Place a php file in your web with
    Code:
    <?php
    phpinfo();
    ?>
    You will find all settings there (check if your modification is done) and which ini files are being used.
     
  6. pecka33

    pecka33 Member

    Thank you. I know exactly which php ini i had to edit, but does not work . Not sure. i looked at mail log and what i can see is following error

    When i put back my changed, after that error is gone.

    Code:
    Mar 22 17:05:40 vm28069 dovecot: lmtp(19867): Error: SSL context initialization failed, disabling SSL: Can't load DH parameters: error:1408518A:SSL routines:ssl3_ctx_ctrl:dh key too small
    Mar 22 17:05:40 vm28069 dovecot: lmtp(19867): Connect from local
    Mar 22 17:05:40 vm28069 dovecot: lmtp([email protected])<19867><S06OI1TAWGCbTQAAobwYfA>: sieve: msgid=<[email protected]>: stored mail into mailbox 'INBOX'
    Mar 22 17:05:40 vm28069 postfix/lmtp[19866]: 7EBD23A21: to=<[email protected]>, relay=vm28069.domain.com[private/dovecot-lmtp], delay=0.11, delays=0.02/0.03/0.03/0.03, dsn=2.0.0, status=sent (250 2.0.0 <[email protected]> S06OI1TAWGCbTQAAobwYfA Saved)
    Mar 22 17:05:40 vm28069 dovecot: lmtp(19867): Disconnect from local: Client has quit the connection (state=READY)
    
     

Share This Page