Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
compose.libre.sh
Manage
Activity
Members
Labels
Plan
Issues
18
Issue boards
Milestones
Wiki
Code
Merge requests
3
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libre.sh
compose.libre.sh
Commits
9ea86c0a
Commit
9ea86c0a
authored
9 years ago
by
Pierre Ozoux
Browse files
Options
Downloads
Patches
Plain Diff
adds a mailbox script
parent
df083275
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils/add_mailbox.sh
+18
-0
18 additions, 0 deletions
utils/add_mailbox.sh
with
18 additions
and
0 deletions
utils/add_mailbox.sh
0 → 100755
+
18
−
0
View file @
9ea86c0a
#!/bin/bash
set
-e
set
-u
set
-x
source
/etc/environment
email
=
$1
email_password
=
$2
local_part
=
`
echo
$email
|
cut
-d
@
-f1
`
email_domain
=
`
echo
$email
|
cut
-d
@
-f2
`
curl
--data
"username=
${
mail_username
}
&password=
${
mail_password
}
&login=Log+In&rememberme=0"
-c
/tmp/cookie.txt https://
${
mail_hostname
}
/auth/login
domain_id
=
`
curl
-b
/tmp/cookie.txt https://
${
mail_hostname
}
/domain |
grep
$email_domain
|
grep
purge-domain |
grep
-o
'purge-domain-[0-9]*'
|
grep
-o
'[0-9]*'
`
curl
--data
"local_part=
${
local_part
}
&domain=
${
domain_id
}
&password=
${
email_password
}
"
-b
/tmp/cookie.txt https://
${
mail_hostname
}
/mailbox/add
rm
/tmp/cookie.txt
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment