Can you create issues through email with sendmail?

toddparson September 21, 2011

Our Unix team doesn't support POP or IMAP mailboxes and instead uses sendmail to send/receive emails on a Unix server. Sendmail appends new emails to a text file under the /var filesystem. I followed the "Add Service" instructions under "Mail Service Configuration" as the documentation says the File Service handler is configured similarly to the POP service. The only difference between what I did and the POP mail setup instructions is that I did NOT create a POP mail server under "Mail Servers."

When I enter the "Subdirectory name" in the Edit Service screen, Jira throws an error saying the directory doesn't exist. I've left it blank, entered the full path to the sendmail text file for the Jira user account's mailbox, and entered a "temp" directory (and created a temp directory in [jira.home]/mail) but these attempts all produced the same error (leaving it blank doesn't produce an error but it doesn't work either). I set the "-Dmail.debug=true" property on startup and enabled debug Jira logging but I'm not getting anymore information in the logs.

Does anyone know if you can create issues/comments from emails without a POP or IMAP mailbox and with sendmail instead? If someone has successfully configured this, would you be willing to share the steps you took to get this configured? Thanks!

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 22, 2011

You're going in the right direction - using emails -> file, but I don't understand why you're leaving the subdirectory blank - the wole point of it being there is that's what Jira is going to scan for mail...

toddparson September 22, 2011

Thanks Nic! Leaving it blank was the only way to get the Update to go through. In other words, every other subdirectory I enter in that field throws the error shown in the screenshot and doesn't allow me to update.

Do you know if Jira can process emails appended to a flat file (via sendmail)? From the wording in the documentation, it sounds like the File Service works for scanning a directory containing emails and doesn't mention scanning a file. Sidenote: the email for the Jira admin account that Jira runs under is written to /var/spool/mail/jira (a text file)....I've tried entering the full path to that file, the directory the file jira is contained in ("/var/spool/mail"), and I've tried creating a [jira.home]/mail/temp directory and just entered "temp" in that input field and still get the error.

Also, since this isn't a POP mailbox, I haven't entered anything in the configuration about where to look for mail so I assume/hope it looks on the local server Jira is running on and does the email scanning locally.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 22, 2011

Oops, yes, I also should have answered the last bit - Yes, it expects the files to be local (hence the subdirectory question). We actually did it on a remote server via a file share, but a Unix box doesn't really care about storage - everything is a file, and it lives in the directory tree, irrespective of physical location.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 22, 2011

Well, I'm not sure how sendmail formats incoming stuff, but creating one text file per mail has worked for one of my clients. That means, yes, I know it can do it, I'm just not sure how to get it to work with sendmail. You might need something to split up the incoming sendmail file.

The main reason I commented was that it took me ages to get it to work, but it was down to Jira not having full read/write access to the directory (a mistake I shouldn't have made, given 15 years working with mostly VMS and Unix and hence having decent security built in, but hey, we all miss the blindingly obvious sometimes!)

toddparson September 22, 2011

Thanks Nic! I turned on some debugging and found that it was looking for emails in /var/opt/jira/import/mail. So I think rather than being a permissions issue or something with the configuration of the service, it was a problem with the base directory it was looking in for email.

In any case, I think I can get it working now, I just need to play with some environment variables/properties on Jira startup. Do you know if the File Service will always look in the [jira.home]/mail as the root directory, only allowing me to specify a subdirectory in [jira.home]/mail? In other words, can I NOT change the root directory from [jira.home]/mail? I'm sure I can play around and figure this out but thought I'd throw it out there in case you've hit that before.

Thanks so much for your help!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events