It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can you create issues through email with sendmail?

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

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...

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.

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.

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!)

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

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you