-
Notifications
You must be signed in to change notification settings - Fork 35
Add --input-encoding switch and document potential need to use with procmail #76
Comments
Chris, so, firstly - having you tried invoking email2pdf with the -vv option? That will maximise the debugging output so we can see what's going on. The next step after that line 83 is to read in the email from stdin (I assume you are not using the -i/-inputFile option?), so I would guess that maybe procmail isn't passing it in correctly or completely. What does your procmailrc look like? Can you reduce it and/or your email down to a small test case that shows the problem? |
Hi, you re right - i'm using stdin. Traceback (most recent call last): Chris |
Chris, OK, that's promising, thanks. I think what's happening here is the procmail is giving the input data of the email to email2pdf in a different encoding from what it's expecting. I've just pushed up a change in commit fa03d4c that should show what email2pdf thinks the encoding is (assuming
It would be helpful to know what XYZ is, both inside and outside procmail. Also, what operating system are you using? Could you tell me the output of the command
|
It seems you are right... procmail: commandline locale Thank you |
OK, do you have a simplified copy of your procmailrc (that still exhibits the problem) that you can share in here? I'm not that familiar with procmail, so I'm not sure why the character encoding is coming out differently. I would guess it's still passing the same mail body into email2pdf, which is why you are seeing the original error. |
Its now very simple - may be thats the problem?
|
Yeah, I can't see any reason why that should be changing the system encoding, given what I know about procmail (which isn't a huge amount). You should not need to do this, but one workaround might be to set an additional environment variable at the top of your procmailrc:
Can you try that please? If that works, I can come up with a more elegant way of forcing/specifying the input encoding as an argument to email2pdf. |
Its works! Thats great - thank you so much, Chris |
Chris, OK. Technically that will affects email2pdf's output as well (i.e. errors and log messages), so when I get a moment I will add a switch to force the encoding more correctly. But what you have should probably work for now. Note to self:
|
Thank you again for your efforts! |
No problem, thanks for your support in making email2pdf better! |
Hi again,
I've one strange problem. I'm using email2pdf with procmail.
Everything works fine except with one specific email. There is no PDF output and i cannot find any hints at the syslog. It just stops with "INFO 83 Output file name is:/home/my/path".
However it works if i run it from the commandline "outside" procmail.
I don't know how to debug to find the problem.
Thank you for any hint...
Chris
The text was updated successfully, but these errors were encountered: