Menu

#14 Autorespond default settings in Qmailadmin

open
nobody
None
5
2015-10-06
2015-10-01
No

Hi,

I have recently installed a qmail server which works just great.

One of the issues I am facing is when I am creating vacation/autoreply through qmailadmin a .qmail file is created with contents as below.

/home/vpopmail/domains/domain.dk/ncd/Maildir/
| /usr/local/bin/autorespond 86400 3 /home/vpopmail/domains/ domain.dk/ncd/vacation/message /home/vpopmail/domains/ domain.dk/ncd/vacation

I would like to change the default value of 3 to 1 , so that just one response goes to per user in a day. At present I have to manually edit the .qmail file and change it to 1.

How do I set it as default so that any user when a usere creates a vacation message the default value is 1 and not 3.

Please help. Or you can point somewhere who can help me.

Discussion

  • Tom Collins

    Tom Collins - 2015-10-01

    Just edit user.c and recompile. Search for this line and change the '3' to a '1':

    fprintf (d, "| %s/autorespond 86400 3 %s/vacation/message %s/vacation\n",
    
     
  • Neville C Dsouza

    Thanks Tom, Your solution worked. I just have a another autorespond issue regarding language. Most of our clients use Danish language. The vacation message created through rouncube or qmailadmin creates a message file which does not understand danish characters.

    Tak for din mail.

    Jeg er på farten og har begrænset adgang til mails.

    Jeg er tilbage på kontoret mandag den 28. september.

    changes to

    Tak for din mail.

    Jeg er på farten og har begrænset adgang til mails.

    Jeg er tilbage på kontoret mandag den 28. september.

    I have tried changing the system language but no solution as yet. Any comments on this ?

     
  • Tom Collins

    Tom Collins - 2015-10-05

    It's probably simply a matter of adding an additional header to the email, possibly Content-Encoding? You could look at some of your own emails. I'm not sure how QmailAdmin is storing the message, maybe UTF-8?

     
  • Neville C Dsouza

    I am not sure how do I add a additional header to the email or content-encoding ? At present Qmailadmin is storing the message in UTF-8 , I want it to store it in ISO-8859-1. How do I change this? This will take care of the danish characters.

     
  • Tom Collins

    Tom Collins - 2015-10-05

    I think it will be easier to modify the source to autorespond so it includes a Content-Type: text/plain; charset=UTF-8 header in the sent email. You might also need to include a Content-Transfer-Encoding: 8bit header.

     

    Last edit: Tom Collins 2015-10-05
    • Neville C Dsouza

      I am guessing this needs to be done in autorespond.c of autorespond-2.0.5. Can u tell me which line needs to be changed and what it would look llike. I found two lines

      if ( (s = inspect_headers( "Content-Type", (char )NULL )) == (char )NULL)
      if ( inspect_headers("Content-Type", "text/plain" ) != (char *)NULL )

      how do I add

      Content-Transfer-Encoding: 8bit header

       
  • Neville C Dsouza

    Ok I found out one more thing which is weird. When I create the vacation message through QmailAdmin the message gets created properly in danish characters. But when i create it thru the user login using rouncube's qmailadmin plugin the characters change. I think I will try a different vacation plugin and see if it works.

     
  • Tom Collins

    Tom Collins - 2015-10-06

    If you come back to autorespond.c, you need to modify send_message():

    fprintf(fdm,"Content-Transfer-Encoding: 8bit\nContent-Type: text/plain; charset=UTF-8\n");
    fprintf(fdm,"Date: %u %s %u %02u:%02u:%02u -0000\nMessage-ID: <%lu.%u.blah>\n"
                ,dt->tm_mday,montab[dt->tm_mon],dt->tm_year+1900,dt->tm_hour,dt->tm_min,dt->tm_sec,msgwhen,getpid() );
    

    As for the problem with QmailAdmin vs. Roundcube, I suspect they're using different encodings when saving the file. One might be UTF8, and the other ISO-8859-1.

     
    • Neville C Dsouza

      Priceless. Your change worked perfectly. The Content Type included in the header made the difference. Thanks for your help.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.