Restore mail not working

Issue #1309 closed
Rajesh created an issue

Hi Janos,

We have installed Piler 1.4.4 build 1001 on Debian 11.00.

Installation was successful and everything is working fine.

Only issue we face is we are not able to restore the mail . We have defined

smarthost with the relay server IP and port 25.

We are not getting any log while restoring mail in mail.log

========================================================

piler.conf path is shown below

-rw-r--r-- 1 root piler 1345 Aug 29 14:36 /usr/local/etc/piler/piler.conf

========================================================

The output of grep config-site.php /var/piler/www/config.php

if(file_exists('/usr/local/etc/piler/config-site.php')) { require_once '/usr/local/etc/piler/config-site.php'; }

================================================================================

The below is config-site.php

<?php

\$config['SITE_NAME'] = 'newpiler1.xx.co.in';
\$config['SITE_URL'] = 'http://newpiler1.xx.co.in/';
\$config['DIR_BASE'] = '/var/piler/www/';

\$config['SMTP_DOMAIN'] = 'xx.co.in';
\$config['SMTP_FROMADDR'] = 'support@xx.co.in';
\$config['ADMIN_EMAIL'] = 'admin@xx.co.in';

\$config['DB_DRIVER'] = 'mysql';
\$config['DB_PREFIX'] = '';
\$config['DB_HOSTNAME'] = 'localhost';
\$config['DB_USERNAME'] = 'piler';
\$config['DB_PASSWORD'] = '********************';
\$config['DB_DATABASE'] = 'piler';

\$config['SMARTHOST'] = '172.x.x.x';
//$config['SMARTHOST_USER'] = '';
//$config['SMARTHOST_PASSWORD'] = '';
\$config['SMARTHOST_PORT'] = '25';
\$config['RT_INDEX'] = 1;
\$config['SPHINX_MAIN_INDEX'] = 'piler1';
\$config['PILER_HEAD_FIELD'] = 'X-piler-id:';

Can you please suggest anything we have missed out to configure.

Regards,

Rajesh

Comments (14)

  1. Janos SUTO repo owner

    Hello Rajesh, I think the config variable references is config-site.php are incorrect. Try removing the backslash (\) from the dollar sign ($), ie.

    $config['SITE_NAME'] = 'newpiler1.xx.co.in';
    $config['SITE_URL'] = 'http://newpiler1.xx.co.in/';
    ....
    

    Also, the next time be sure not to include the database password.

  2. Janos SUTO repo owner

    Now compare your config settings with mine. Are they the same? No. Can you spot the difference? Now, please fix ALL settings in config-site.php

    \$config['SITE_NAME'] = 'newpiler1.xx.co.in'; // this is BAD!
    $config['SITE_NAME'] = 'newpiler1.xx.co.in'; // this is GOOD
    

  3. Rajesh reporter

    HI Janos,

    \ is not there in our config file , it is adding while posting in the website.

    It is same as you mentioned.

  4. Janos SUTO repo owner

    Ehh, you should really use the formatting options of bitbucket, otherwise you just mislead me.

    So a regular user wants to restore an email. He clicks on the restore link, then sees a splash text showing “OK” or something like that, right? If so, then check the logs of the smarthost, or even run

    ngrep -X port 25 host 172.x.x.x
    

    on the archive to verify that the archive actually attempts an smtp connection.

  5. Rajesh reporter

    Hi Janos,

    Mails are restored but the header is added along with the body.

    FROM field is showing blank in the mail restored.

  6. Rajesh reporter
      <div class="preview-container wiki-content"><!-- loaded via ajax --></div>
      <div class="mask"></div>
    </div>
    

    </div> </form>

  7. Rajesh reporter

    Hi Janos,

    After restoring the mail , the mail header is getting attached in to the mail body and FROM email id is not displayed in the restored mail.

    I have attached ngrep & mail body output.

  8. Rajesh reporter

    The issue was with smtp server , we changed the smarthost server to different smtp server , now it is working fine.

    Thanks for your support.

  9. Log in to comment